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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ChrisC33
New Member

Running total / cumulative count - problem adding legend

Hey community,

 

it is my first request for help. Since being very new to Power Bi I was trying to help myself and searched for solutions in the community. But unfortuetly I haven't found any solution yet.

 

Objective:

I want to show lines for each production year (legend).

Values of the lines are running total of parts [Parts] (y-axis) over month in service [MIS] (x-axis).

 

I used an addtional measure as values


Running Total = CALCULATE(COUNT(Table[Parts]); FILTER(ALLSELECTED(Table[MIS]); Table[MIS]<=MAX(Table[MIS])))

 

Problem:

It works without adding production year to legend. Then I have one line combining all production years. If I add it to legend, I get multiple lines which increase and drop 😞

 

I tried to check  "show items with no data" - it doesn't help.

 

Thank you

Chris

1 REPLY 1
kcantor
Community Champion
Community Champion

@ChrisC33 

Do you have a seperate date table that you are using to populate the years or are you populating the years from the fact table?

A good rule of thumb is to create measures and use value from the fact table and to populate rows and axis from the lookup/dimension table.






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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