Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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 me today one year ago for comparison.
the "ordersumma" column and the "upplagd" column are all in the same table.
any ideas how to get this to work is much appreciated.
//:Erik
Solved! Go to Solution.
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 _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Erik70 Try:
Measure =
VAR __Today = TODAY()
VAR __1YearAgo = DATE(YEAR(__Today)-1,MONTH(__Today),DAY(__Today))
RETURN
SUMX(FILTER(ALL('PBI_kundorder'),[Upplagd] = __1YearAgo),[Ordersumma])
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?
Hi, thanks for your effort but neither of the suggested fixes seems to work, no errors just blank renamed it to lastyear! wondering if this has to do with that the date includes a timestamp also?
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |