Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Evening PowerBI people.
I am in need of some DAX assistance.
I have created a table called TodaysDate that hols todays date plus a measure to calculate 3 months back.
I have then written the below DAX in another table to Sum "Revenue" but only where the Date "Financial Period" > 3 months back
Solved! Go to Solution.
You cannot use two columns in the calculate statement. These should work
Total Revenue = VAR d = MAX(TodaysDate[3monthsback]) RETURN SUMX( FILTER( 'Ex SP Figures', 'Ex SP Figures'[Financial Period] > d ), 'Ex SP Figures'[Revenue] )
Total Revenue = calculate( SUM('Ex SP Figures'[Revenue]), FILTER( 'Ex SP Figures'[Financial Period], 'Ex SP Figures'[Financial Period]>MAX(TodaysDate[3monthsback]) ) )
Hi @GarethWoodhouse,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
You cannot use two columns in the calculate statement. These should work
Total Revenue = VAR d = MAX(TodaysDate[3monthsback]) RETURN SUMX( FILTER( 'Ex SP Figures', 'Ex SP Figures'[Financial Period] > d ), 'Ex SP Figures'[Revenue] )
Total Revenue = calculate( SUM('Ex SP Figures'[Revenue]), FILTER( 'Ex SP Figures'[Financial Period], 'Ex SP Figures'[Financial Period]>MAX(TodaysDate[3monthsback]) ) )
Hey,
please have a look at this site:
https://www.daxpatterns.com/time-patterns/
I guess, here you will your answer.
Regards,
Tom
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |