Forum Discussion

Mak_Leo's avatar
Mak_Leo
New Member
3 years ago
Solved

Running total missing values

Hi,   I'm facing an unusual issue that I'm not able to solve. I've created a running total on a table that which increment every year. In the same project I've also a counter for every yea which ...
  • Ashish_Mathur's avatar
    3 years ago

    Hi,

    This pattern should work

    1. Create a Calendar Table with a calculated column formula to extract the Year
    2. Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table
    3. To your visual, drag Year from the Calendar Table
    4. Write these measures

    Count = CALCULATE(SUM(Table[Counter]),Table[Type]="TYPE1")

    Running count = calculate([count],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))

    Hope this helps.