Forum Discussion
Erik70
3 years agoFrequent Visitor
same day last year
Hi, im struggling to get this "same day last year" to work. i have ordersum and if i set filters manually it will show the correct value but i want it to automatically look at todays date and show ...
- 3 years ago
Hi Erik70 ,
According to your description, I created a sample and here is my solution.
Create a measure.
measure = SUMX ( FILTER ( ALL ( 'PBI_kundorder' ), [Upplagd] = EDATE ( MAX ( 'PBI_kundorder'[Upplagd] ), -12 ) ), [Ordersumma] )Final output:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
3 years agoErik70 Try:
Measure =
VAR __Today = TODAY()
VAR __1YearAgo = DATE(YEAR(__Today)-1,MONTH(__Today),DAY(__Today))
RETURN
SUMX(FILTER(ALL('PBI_kundorder'),[Upplagd] = __1YearAgo),[Ordersumma])
Erik70
3 years agoFrequent Visitor
Hi, thanks for your effort but neither of the suggested fixes seems to work, no errors just blank (renamed it to lastyear2)! wondering if this has to do with that the date includes a timestamp also?