Forum Discussion

NathanSaber's avatar
NathanSaber
Frequent Visitor
5 years ago
Solved

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

CategoryMonthTo Date
A3080
B100135

 

I've tried the following DAX formula for my To Date Measure, however it is returning the same results as the Month column above.

To Date =

CALCULATE(SUM(Transactions[Amount]),FILTER(ALL(Transactions[Period]),Transactions[Period] <= MAX(Transactions[Period])))

 

The details of the tables are below. They are linked via the Period field in both Tables. One to Many relationship (One - Period Table, Many - Transactions Table)

 

Transactions

PeriodAmountCategory
120A
130B
420A
410A
45B
840B
830A
860B
915A
925B
1210A
1230A

 

Period

PeriodMonth
1Jul
2Aug
3Sep
4Oct
5Nov
6Dec
7Jan
8Feb
9Mar
10Apr
11May
12Jun

3 Replies