Forum Discussion
Show total only last month
- 9 years ago
HI,
Tks everybody for answers...
I solved:
Column
LastMonth = IF(YEAR(TODAY())= YEAR('Fact'[Date]) && MONTH(TODAY())-1 = MONTH('Fact'[Date]);1;BLANK())
Measure
Mymeasure = CALCULATE(SUM('Fact'[Value]);'Fact'[LatMonth] =1)
HI,
Tks everybody for answers...
I solved:
Column
LastMonth = IF(YEAR(TODAY())= YEAR('Fact'[Date]) && MONTH(TODAY())-1 = MONTH('Fact'[Date]);1;BLANK())
Measure
Mymeasure = CALCULATE(SUM('Fact'[Value]);'Fact'[LatMonth] =1)
Hi,
Your formula might have failed by now as the current year is not anymore the same as YEAR('Fact'[Date]) but still is last month.
I created a measure as the key for identifying
LastMonth = if(MONTH(TODAY())-1=0,12,MONTH(TODAY()-1)) &" "& (YEAR(TODAY())-1)
Also a column for identifying those.
IsInLastMonth = IF(DateTable[MonthAndYear]=[LastMonth],TRUE(),FALSE())