March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dear All Experts,
I have created a moving average for the Book to Bill ratio as below illustrate. I also want to create a measure which pick the moving average of the latest period selected based on the date slicer. This measure should pick the MA of 2024-Jun, which is 1.53 because the date selected in below is Jun 2022 to Jun 2024. Can you please advise what is the Dax formula to retrieve the MA value of the latest period based on the date range selected in the slicer?
Solved! Go to Solution.
Hi,
PBI file attached.
Hope this helps.
Hi,
Drag this measure to a card visual
Measure = calculate([MovingAverage(BooktoBill)],datesbetween(calendar[date],eomonth(max(calendar[date]),-1)+1,eomonth(max(calendar[date]),0)))
Don't do this 😂. It's not correct.
First, provide a sample of data as @lbendlin requested. That will help tremendously...he helped me with something last week. And thank you!
Second, there are some really powerful windows functions that will probably get you to where you want to be. Just need some clarification on what the end goal is.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Hi @lbendlin
Thank you for your suggestion. I actually would like to attached the original PBI file but there is no attachment function when I post. I remembered that there was attach function when I posted quite sometimes back. May I know where I can attached the file when I post/reply?
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Hi @lbendlin
I shared the file with the link below. Please let me know if you can access?
https://drive.google.com/file/d/1lCnvWV3T5tBsmUn5WkfqVH_lvDNZ7OH9/view?usp=sharing
Awesome! Thanks a lot...
You are welcome.
Your formula seems to produce the right result?
says 1.53 for June 2024.
How Do I create a Dax formula which show the moving average of the latest month based on the range of the period selected. The latest month in the date range selected from example above is June 2024 and the moving average is 1.53. However, when I drag the Dax measure Movingaverage(Booktobill) to a card, it shows the MA of total 2.56 instead of 1.53.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
53 | |
44 |
User | Count |
---|---|
204 | |
105 | |
99 | |
64 | |
54 |