Forum Discussion

ChrisC33's avatar
ChrisC33
New Member
7 years ago

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

  • kcantor's avatar
    kcantor
    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.