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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Oros
Post Partisan
Post Partisan

Rolling Average Sales Measures stopped working

Hello.

 

I have a table that has a parameter slider in increments of 7 (days).

PRODUCTROLLINGSUMAVEROLLING AVERAGE SALES PER WEEKCURRENT INVENTORYWEEKS TO SELL
APPLE147284

 

This table is working properly until the three columns stopped showing any data (ROLLINGSUMAVE, ROLLING AVERAGE SALES PER WEEK and WEEKS TO SELL).  This happened when a scheduled data refresh failed. Any help a greatly appreciated.  Thanks.

----------------------

I have the following measures:

 

Rolling Average Sales Per Week = [RollingAve]*7
-------------------------------
RollingAve =
   VAR NumDays = Parameter[Parameter Value]
   VAR RollingSum =
         CALCULATE(
SUM('SALES TABLE'[SALES]),
         DATESINPERIOD('SALES TABLE'[Postingdate], TODAY(),-Parameter[Parameter Value],DAY)
         )
     RETURN
         RollingSum/NumDays
 
---------------
 
RollingSumAve = VAR NumDays = Parameter[Parameter Value]
VAR RollingSum = CALCULATE( SUM('SALES TABLE'[SALES]),
DATESINPERIOD('SALES TABLE'[SALES], TODAY(),-Parameter[Parameter Value],DAY) )
RETURN RollingSum
 
----------------
WEEKS TO SELL =
        DIVIDE(SUM('PRODUCT TABLE'[Inventory]),[Rolling Average Sales Per Week])
2 REPLIES 2
Greg_Deckler
Super User
Super User

@Oros See if this helps: Better Rolling Average - Microsoft Power BI Community

 


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler,

 

Thank you for your quick reply.  I watch the video but unfortunately still a little bit advanced for me for the specific question that I have.  Thanks again.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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