Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi Team i need convert below tableau expression to dax, Basically this will give rolling average based on month selected in slicer so can you please help me to fix this.
WINDOW_AVG([Forecast MAPEQ REQ Selected Period ACC_Max_restriction],-11,0)
Solved! Go to Solution.
Hi @danextian , i tried this already but my requirement is I have a slicer when user select an month bar chart will show Rolling average for until that month .
I thought you wanted just the rolling average but show the past x months as well. Slicer selection from a related or the same table will filter the rows to just what are selected. You will need to use a disconnected table for that. Please see attached sample pbix.
Hi @sreddy47652
You will need something like below:
CALCULATE (
AVERAGEX ( ALL ( 'Calendar'[Year], 'Calendar'[Month] ), [Balance] ),
DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), - 3, MONTH )
Please refer to a similar post - https://community.fabric.microsoft.com/t5/Desktop/Measure-Rolling-average/m-p/4049892#M1285912
This is discussed in detail at - https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Hi @danextian , i tried this already but my requirement is I have a slicer when user select an month bar chart will show Rolling average for until that month .
Have you checked on the sample pbix. Filtering the visuals to a month should still return the rolling average correctly
@danextian i checked the attached Power bi file in above article but i need Rooling average based on slicer selection, for example user select April 2024 in slicer then i need to display in Barchart to Dec 2023,Jan 2024 Feb 2024, March 2024, April 2024(That month).
I thought you wanted just the rolling average but show the past x months as well. Slicer selection from a related or the same table will filter the rows to just what are selected. You will need to use a disconnected table for that. Please see attached sample pbix.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 39 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 34 | |
| 32 | |
| 29 |