Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm trying to simplify my formulas by relying on another defined measure, but can't seem to get it working.
In this example, the dates need to be shifted back a month but otherwise use the same function for the current month.
The measure in reference uses Dates[Date] as the driver and works fine.
Any thoughts on how to get this "nested" measure working?
VAR Date2 = PREVIOUSMONTH(Dates[Date]) RETURN
sumx(filter(Dates,Dates[Date]=Date2),[Revenue])
Solved! Go to Solution.
There are a dozen tables with dates and relationships within - so that's not really an option. All measures are written as some form of sumx(values(dates) or using max(dates) as a workaround.
Hi,
Try this
=CALCULATE([Revenue],PREVIOUSMONTH(Dates[Date]))
There should be a relationship from the Date column of your base data table to the Date column of your Dates table. In the Dates table, extract the month in another column by using the =FORMAT(Dates[Date],"mmmm") formula. In your visual, drag the Month column from your Calendar table.
There are a dozen tables with dates and relationships within - so that's not really an option. All measures are written as some form of sumx(values(dates) or using max(dates) as a workaround.
Hi @avalerion,
The formula @Ashish_Mathur posted is right. What's meaning of "so that's not really an option"? Have you resolved your issue? If you have, welcome to share your solution or mark the right reply as answer. More people will benefit from here.
Thanks,
Angelia
User | Count |
---|---|
94 | |
79 | |
76 | |
64 | |
60 |
User | Count |
---|---|
108 | |
101 | |
77 | |
63 | |
61 |