Forum Discussion

Elofly's avatar
Elofly
Frequent Visitor
3 years ago

Running Total with blank value not cumulating values

Hello,

 

I have build up this formula to retrieve Running Totals for the amount of hotel chains signed in the past years:

Running Total Hotel Chains Signed =
CALCULATE(
    DISTINCTCOUNT(tbHotelChains[IdHotelChain]),
    FILTER(
        ALL(tbHotelChains),
        tbHotelChains[CommercialNotificationDate]<= MAX(tbHotelChains[CommercialNotificationDate])
    )
)
 
However the results I get is the following:
YearMonthCount of IdHotelChainRunning Total Hotel Chains Signed
2022January11933
2022February11934
2022March 1872
2022April 1872
2022May41938
2022June41942
2022July11943
2022August11944
2022September 1872
2022October 1872
2022November 1872
2022December 1872
2021January31907
2021February61913
2021March41917
2021April41921

 

So that when data is BLANK, the running total is getting bacl to previous values, how can I avoid that?

 

Thanks

 

2 Replies

  • Hi,

    In the visualization and in the measure, please try using year column and month column from a dim-calendar table, instead of using those from the fact table.

    Thanks.