Forum Discussion
Running Total with Date Slicers
- 4 years ago
I downloaded the PBI and saw how you were able to get the data in a table and that is extremely helpful. I am trying to do something similar but with a card visualization. The slicer is a list of months and when I click on March, I would like to see the running total from the beginning of the year until the end of that month. I tried using TOTALYTD but was unable to get it to work properly with the slicer. I was only able to pull the total up to current time.
- Ashish_Mathur4 years ago
Super User
Hi,
This measure should work
=calculate(sum(Data[Amount]),datesbetween(Calendar[Date],date(year(min(calendar[Date])),1,1),max(Calendar[Date])))
Ensure that you have a slicer for Month name and Year (both from the Calendar Table). Select a year and month.
- bm_data4 years agoFrequent Visitor
I was not able to get this to work with that measure. I ended up removing both my Month and Year slicers and creating one Month/Year slicer. Then using this measure, I was able to get it to work:
= TOTALYTD(COUNT('Table'[Id]), 'Dates'[Date], "9/30")