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.
How do I create a measure that sums the total of expected revenue but excludes anything over 2 months old. I only want to include the previous month and any dates moving forward. Example outlined in red below.
I have a calendar table in my data model.
Hi, @rachaelwalker
You can try the following DAX:
Expected Revenue Last Month Forward =
CALCULATE(
SUM('Table'[Expected]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] >= EOMONTH(TODAY(), -2) + 1 &&
'Calendar'[Date] <= EOMONTH(TODAY(), 0)
)
)
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yohua-msft This is returning a repeating number that is showing an incorrect total.
Here is a pbix file with sample data. The file includes the expected results I am looking for https://drive.google.com/file/d/1T_U0XFpcMWJ3Jfv3sgNZQ2YJKyjgv5bS/view?usp=sharing
@rachaelwalker , try this measure, 'DATE'[DATE] is assumed from you Date table
CALCULATE(
SUM(REVENUE COLUMN),
'DATE'[DATE]>=DATEADD(TODAY(), -2, MONTH)
)
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 |
---|---|
39 | |
25 | |
20 | |
14 | |
8 |
User | Count |
---|---|
71 | |
47 | |
46 | |
20 | |
16 |