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.
Hi all,
I’m new to PowerBI. Trying to display the average of previous day’s data (excluding today’s data) E.g. average 1st – 9th June. I’ve created the following formula so far, but it sums up till today’s (10th June) instead of only till 9th June data? How can I avoid including today’s data (10th June)?
Avg =
if ( EOMONTH(max('Date'[Date]);0)=EOMONTH(today();0);
( TOTALMTD(SUM(Values[Quantity]);DATEADD(DATEADD('Date'[Date];0;Month);-1;Day))/day(today()-1) );
( TOTALMTD(SUM(Values[Quantity]);DATEADD(DATEADD('Date'[Date];0;Month);0;Day))/ day(EOMONTH(max('Date'[Date]);0)) ) )
Any ideas?
@Anonymous Instead of using TOTALMTD(), another way you might want to try is to manually set a start and end dates. So the measure looks like this:
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 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |