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.
Hey guys,
I'm trying to write a measure to calculate the average 'Amount Accepted' for the previous three months based on the filtered month.
For example if the filter is currently set to 'January' and '2020', I want a measure which will calculate the average 'Amount Accepted' for the months of October, November and December 2019 dynamically.
Moreover, I'm also looking to add the functionality which limits the number of days it averages based on the current day.
For example today is the 23rd of January 2020. The measure should dynamically consider the 1st-23rd day of the previous three months only when calculating the average.
I currently have a measure called 'Accepted' which does a distinct count on a boolean column called 'IsAccepted'. So i assume the measure will be based on this.
The measure looks as follows:
I'm going to post an example of the tables I am working with:
Date:
Try Like
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-3,MONTH))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Hi Amit, this doesn't completely solve my issue. It also includes the current filtered month and doesn't filter each month based on month to day.
I have since found something that worked for me thanks :).
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 |
---|---|
108 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |