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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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