Skip to main content

Hi All,

 

I have a view in which the

Row  contains two measures “Age” and “Number of Records” 

Column contain “Aggregated Date by week”

 

The view is a dual axis chart with Sum(Number of Records) on one side of the Dual axis and Sum(Age) on the other.

 

Average reference line

 

What I want is to add a reference line which gives the average age of all the number of records in the view.

So I would like the average line to be.  (179+104+21)/ (12+4+1)   = 17.88

 

I am trying to add the windows_avg function however I am not getting the desired results. 

Any suggestion will be helpful. I have also attached the workbook "Average line"

 

Regards,

Rishi Saka

4 respuestas
  1. 6 may 2020, 4:50

    Hi Rishi,

     

      Here is your solution using a Calculated field and placing it in Details for the Age Measure since

    we are calculating the Avg Age. The WINDOW_SUM function was used as shown below:

     

    Hi Rishi, Here is your solution using a Calculated field and placing it in Details for the Age Measure sincewe are calculating the Avg Age.

     

    Finally after adding the reference line, here is what we get:

     

    Visual.png

     

    I have attached the twbx file below (ver 10.5). Hope this was helpful and correctly answers your problem.

    Take care and Best wishes !

     

    Sincerely,

     

    Soumitra
0/9000