Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |