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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.