Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PBOBOP
Frequent Visitor

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: 

PBOBOP_0-1721869573757.png

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?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PBOBOP ,

 

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

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

vstephenmsft_0-1721977075040.png

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.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @PBOBOP ,

 

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

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

vstephenmsft_0-1721977075040.png

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.

 

Ritaf1983
Super User
Super User

Hi @PBOBOP 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.