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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PowerBi_1404
Frequent Visitor

Need Help in DAX for Getting 25 days Rolling Average & Standard Deviation for provided Data Format

Greetings. 

 

I am trying to get 25 days Rolling Average based on the data which has only YearWeek and StartDayofWeek as date columns. The requirement is that the 25 days Rolling Average should be calulated at diffrenent Dimension Columns selected in table.

CalendarMonth, ObjectID, DimColumnA, DimColumnB, DimColumnC, DimColumnE, DimColumnC, AverageRollingSum

 

I tried with Many Dax, but not giving me the expected rolling Average, always gives the SUM as result. Not really sure if its beacuse of the data. below is the Sample data. Values is the column that needs to be considered for rolling Average.

 

YearWeekStartDayOfWeekObjectIDCalWeekCalendarMonthValuesDimColumnADimColumnBDimColumnCDimColumnEDimColumnC
2024011/1/20241120240120240110.00Time001 LMM901NNPOS
2024011/1/2024112024012024010Time001 KML00MM 
2024011/1/20241120240120240120.00Time002 N9001MM 
2024011/1/2024152024012024010Time002KOABC102MM 
2024028/1/20241120240220240210.00Time001 LMM901  
2024028/1/20241120240220240220.00Time001 KML00  
2024028/1/2024112024022024020Time0003 KML00  
2024028/1/2024162024022024020Time0003 KML00  
2024028/1/20241520240220240210.20Time002 ABC102  
20240315/1/2024112024032024030Time001 LMM901  
20240315/1/20241120240320240312.09Time001 KML00  
20240315/1/2024112024032024030Time0003 KML00  
20240315/1/20241120240320240315.10Time002 N9001  
20240315/1/2024152024032024030Time002 ABC102  
20240422/1/2024112024042024040Time001 LMM901OL 
20240422/1/20241120240420240410.00Time001 KML00MM 
20240422/1/20241120240420240406Time002KON9001MM 
20240422/1/2024152024042024040Time002 ABC102MM 
20240529/1/20241120240520240520.00Time001 LMM901  
20240529/1/2024112024052024050Time001 KML00  
20240529/1/2024112024052024050Time0003 KML00  
20240529/1/2024162024052024050Time0003 KML00  
20240529/1/2024152024052024050Time002 ABC102  
2024065/2/2024112024062024060Time001 LMM901  
2024065/2/20241120240620240610.00Time001 KML00  
2024065/2/2024112024062024060Time0003KOKML00  
2024065/2/2024112024062024060Time002 N9001  
2024065/2/2024152024062024060Time002 ABC102  

 

 

 

3 REPLIES 3
talespin
Solution Sage
Solution Sage

hi @PowerBi_1404 

 

I don't see a way to find 25 day rolling average, can be 2,3,4,5... Week rolling average.

Can you share pbix file with sample data/mockup data and end result for comparison.

Hi talespin,

 

As i am a recent users, not able to upload files. But Below are the sample data.

The requirement is when i have YearWeek column in report it should do 12 weeks rolling average at Week level, When i add DimColumnA it should then recalculate 12 weeks rolling average at  DimColumnA. and when   DimColumnB is added it t should  recalculate 12 weeks rolling average at  DimColumnB. 

tharunkumarRTK
Solution Sage
Solution Sage

@PowerBi_1404 
You can perform rolling average using DAX window function, 
here is a example from SQL BI 

 

https://www.sqlbi.com/articles/introducing-window-functions-in-dax/

 

Or if you are using latest version of Power Bi desktop then you can use visual calculations: https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.