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.
Hello,
I have a data set that is updated once or twice per month.
A project might appear in more month so the same raw might appear multiple times, this is why I only want to use the most recent date.
Previously, the data was updated monthly and I just used MONTH (TODAY () -1) or MONTH(TODAY() ) if I refer to current month. But if I have my data is updated updated on 05.09.2020 and 10.09.2020 the below formula that I use right now will return a blank. Please note that the below formula first checks if there is any data in the current month and calculates the SUM, but if there is no data in the current month, it calculates the total SUM from last month.
What I need now, is just a formula that calculates the same thing, but for the most recent month.
Please see the current formula below:
Thanks so much!
Solved! Go to Solution.
hi @Anonymous
You just need to add ALL in the formula as below:
By the way, you'd better use a dim date table in your mode, see more details as below:
https://radacad.com/do-you-need-a-date-dimension
if you still have the problem, just share your sample pbix file and your expected output, that will be a great help.
Regards,
lin
hi @Anonymous
You just need to add ALL in the formula as below:
By the way, you'd better use a dim date table in your mode, see more details as below:
https://radacad.com/do-you-need-a-date-dimension
if you still have the problem, just share your sample pbix file and your expected output, that will be a great help.
Regards,
lin
@Anonymous , better to have a month year column
Date Snapshot Month =format([Date Snapshot] , "MMM-YYYY")
Try measure like
CALCULATE (
lastnonblankvalue( PA[Date Snapshot] ,SUM (PA[Sales incl VAT] ) / SUM ( PA[Sales Without VAT] )),
allexcept(Table,Table(PA[Date Snapshot Month] ))
)
CALCULATE (
SUM (PA[Sales incl VAT] ) / SUM ( PA[Sales Without VAT] ), filter( Date, Date[date] = Max(PA[Date Snapshot]))
allexcept(Date,Date(Date[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 |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |