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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PSB
Helper III
Helper III

rolling 7 days Median trend (Power Query)

I have data with Date and Data field. I need rolling 7 days median chart.

for each day, I need what was past 7 days median.  X-Axix (date), Y-Axis (Median value for past 7 days)

there are multiple values for each day.

DateData
1/1/20210.1
1/1/20210.5
1/1/20210.9
1/2/20210.5
1/2/20210.6
1/2/20210.6
1/3/20210.1
1/3/20210.9
1/3/20211.8
1/4/20212.8
1/5/20213.8
1/6/20214.8
1/7/20215.8
1/8/20216.8
1/9/20217.8
1/10/20218.8
1/11/20219.8
1/12/202110.8
1/13/202111.8
1/14/20210.6
1/15/20210.1
1/16/20210.9
1/17/20211.8
1/18/20212.8
1/19/202117.8
1/20/202118.8
1/21/202119.8
1/22/20210.6
1/23/20210.1
1/24/20210.9
1/25/20211.8
1/26/20212.8
1/27/202125.8
1/28/202126.8
1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1701398933308.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

This shoud typically be done with a measure (not in Power Query).  Would you be OK with that?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Yes, that will work too. Would you please share pbix file with solution?

 Thanks

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1701398933308.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Really appreciate your help. This solution worked for me.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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