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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Dynamic Line Chart with Total and many lines

Hi Experts
 
I am trying to create and dynamic line chart based on status, current i have measure that is the sum the Staus A and B and I plot these to give me multiple line and then I sum the two Status to get the total. See pbix..
 
I want to be able to dynamically have a total line, and also be able to select either Status A and or B or both on the same graph.

https://www.dropbox.com/s/1gm1qzku7abd3gu/line_and_bar.pbix?dl=0
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous Please create two measure 

Total = CALCULATE(SUM('Table (2)'[amount]),ALL('Table (2)'[status]))

SelectedStatus = CALCULATE(SUM('Table (2)'[amount]),ALLSELECTED('Table (2)'[status]))

First is for total and second is for selected status. let me know if have any question 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@Anonymous Please create two measure 

Total = CALCULATE(SUM('Table (2)'[amount]),ALL('Table (2)'[status]))

SelectedStatus = CALCULATE(SUM('Table (2)'[amount]),ALLSELECTED('Table (2)'[status]))

First is for total and second is for selected status. let me know if have any question 

Anonymous
Not applicable

hi vimal...

 

slight issue if you add a slicer to the pbix file, and you select only status A, the graph works fine, when you select both A and B i would expect to see two line and the total. But i am getting the sum of lines A and B and the total which is incorrect. see image

 

Capture.PNG

 

Anonymous
Not applicable

many thanks.. vimal much appericated.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.