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.
I have a table with several columns. One column is the date. Another column is the plant. Another column is the daily production. I want to plot the 10-day moving average of the daily production for a specific plant that the user can select, factoring in zero daily production for days when the plant did not produce. If the plant did not produce on a particular day, there is no record of production (data will not appear with zeros in my data set). I want the horizontal axis of my chart to show me all the days of the year. What is a good way to achieve this goal?
My attempt was to create a measure
Measure = calculate(sum(production,DATESINPERIOD(dates,LASTDATE(dates,-10,DAY))/10
That seems to return the correct moving average on the days when the plant produced something, but it only returns values on the days when the plant produced, whereas I want the measure to be calculated on every single day, factoring in zeros for days when there are no records of production for the plant. I have tried changing continuous/categorical x-axis but that does not fix it.
Solved! Go to Solution.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
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 |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |