Forum Discussion
NathanSaber
6 years agoFrequent Visitor
Sum to Date
I'm having trouble calculating the Sum to Date when selecting a month from a Slicer. The result I'm expecting is per table below when I select Feb from the Month Slicer Category Month To Da...
- 6 years ago
NathanSaber , In case you have date prefer Time Intelligence
In This case, the Assume period is joined to Transaction. Ideally, In such cases you need to have the time/period table separately and use that
To Date =
CALCULATE(SUM(Transactions[Amount]),FILTER(ALL(Period),Period[Period] <= MAX(Period[Period])))In case you have a Date, refer
Power BI — YTD
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Greg_Deckler
Community Champion
6 years agoNathanSaber - Try
Measure =
VAR __Category = MAX('Transactions'[Category])
VAR __Period = MAX('Period'[Period])
RETURN
SUMX(FILTER(ALL('Transactions'),[Category]=__Category && [Period]<=__Period),[Amount])