Forum Discussion
Chrism123
8 years agoFrequent Visitor
Last date Previous Month
Hi, I am trying to find a way to calculate the sum of a value for the last day of the previous month. For example: If I filter for 31.10.2017 the measure should return the values of 30.09.201...
- 8 years ago
HI Chrism123
May be this one
= CALCULATE ( SUM ( Table1[Amount] ), LASTDATE ( PREVIOUSMONTH ( Kalender[Date] ) ) )
Chrism123
8 years agoFrequent Visitor
Hi,
thanks for your reply. When I use this formula I get the sum for all the dates of the previous month. But I only want to have it for the last day of the month.
Zubair_Muhammad
8 years agoCommunity Champion
HI Chrism123
May be this one
=
CALCULATE (
SUM ( Table1[Amount] ),
LASTDATE ( PREVIOUSMONTH ( Kalender[Date] ) )
)- Chrism1238 years agoFrequent Visitor
Thanks that works :smileyhappy:
Do you know if it is also possible to apply this forumula to a measure that is already existing?
I would like to filter the measure [Sales EUR FX] to be calculated for the last date on the previous month. Is this possible?
Here is my latest approach:
=Filter(LASTDATE(PREVIOUSMONTH(Kalender[Date])),[Sales EUR FX])
- Zubair_Muhammad8 years agoCommunity Champion
Hi Chrism123
I think this should work
CALCULATE ( [Sales EUR FX], LASTDATE ( PREVIOUSMONTH ( Kalender[Date] ) ) )- Chrism1238 years agoFrequent Visitor
very good, thanks. I didn't know that it was possible to use calculate like this.