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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors