Forum Discussion

PBOBOP's avatar
PBOBOP
Helper I
2 years ago
Solved

Line Values in the Line and Column Clustered Chart

Hello, 

 

I am trying to create a line and column clustered chart to show the average volumes per day per person (Columns) and the average volumes per day between the selected people(Line), by their age range.  This is what I am getting at the moment: 

In the age range 1-2, the average should be (7.36+8.42)/2=7.89, instead of 7.94.
Similary, the average for the age range 2-3 and 3-4 should be 9.73 and 11.21 respectively, instead of 10.10 and 16.26. 

 

I have used the following measure:

Average Volume/Day = 

CALCULATE(DIVIDE(SUM(Medicine[Volume (ml)]), DISTINCTCOUNT(Medicine[Consumed Date])),
USERELATIONSHIP(Medicine[Patient Name], 'Items'[Name]))
 
Can somebody please explain to me how to get the line to reflect the average volume of medicine consumed between the selected patients for the particular age range?
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi PBOBOP ,

     

    You can create another measure to put in Line y-axis.

    Measure = AVERAGEX('Medicine',[Average Volume/Day])

    If the above measure doesn't work, try the below. If your visual's name field is from table 'Items', I'd prefer to trust you to use this measure.

    Measure = AVERAGEX('Items',[Average Volume/Day])

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PBOBOP ,

     

    You can create another measure to put in Line y-axis.

    Measure = AVERAGEX('Medicine',[Average Volume/Day])

    If the above measure doesn't work, try the below. If your visual's name field is from table 'Items', I'd prefer to trust you to use this measure.

    Measure = AVERAGEX('Items',[Average Volume/Day])

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.