Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
sreddy47652
Helper III
Helper III

Convert Tableau expression to dax

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)

2 ACCEPTED SOLUTIONS

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 .

View solution in original post

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.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

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/ 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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_0-1721718318453.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@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.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.