Forum Discussion

balumaran's avatar
balumaran
Frequent Visitor
9 years ago
Solved

Cumulative Sum With Slicer

Hi,  I am fairly new to Power BI and trying to find my ways in .    I have a requirement to display YTD value ( running sum) on a sales measure with a Month Slicer.  I was able to get the running ...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Of course!

    mattbrice is right.

    In order to get YTD using ALL you need to use this:

    YTDSales = CALCULATE([Sales],FILTER(ALL('Business Date'),'Business Date'[Date]<MAX('Business Date'[Date])&&'Business Date'[Year]=YEAR(MAX('Business Date'[Date]))))

    or just use this staightforward formula:

    YTDSales = TOTALYTD([Sales],'Business Date'[Date])

     

    And make sure you use Date column from your 'Business Date' table in slicer

    Michael