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

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.

Reply
VikramAdi
Helper II
Helper II

Rolling

 
8 REPLIES 8
VikramAdi
Helper II
Helper II

Thanks 

@VikramAdi Please provide sample data and expected output because I'm not understanding what you want.


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

Thanks

@VikramAdi As far as I can tell, the cumulative measure is returning correct results. Check out the table in the image. The cumulative measure is adding up the 30 day averages as it goes. So, the question becomes, what do you want the results to be? Because the cumulative measure is doing exactly what it is supposed to do. I attached the PBIX file below signature.

Greg_Deckler_0-1678201138254.png

 


@ 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 , could you please check this query please.

VikramAdi
Helper II
Helper II

Thanks for your responce @Greg_Deckler ,

 

@VikramAdi So like this?

Cumulative Measure = 
  VAR __Date = MAX('Date'[Date])
  VAR __Table = SUMMARIZE(FILTER(ALL('Dates'),[Date]<=__Date),[Date],"__30Avg",[Rolling 30 Days Average])
  VAR __Result = SUMX(__Table,[__30Avg])
RETURN
  __Result

@ 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...
Greg_Deckler
Super User
Super User

@VikramAdi Sorry, what do you mean by cumulative rolling 30 day average? Do you mean that 30 days ago just 1 day is displayed, 29, 2 days, 28, 3, etc?

Better Rolling Average - Microsoft Power BI Community


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors