cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Chart with last 4 weeks' data and secondary chart with just last week's data

Hello! This is my first forum post so please be understanding if I post too much info, I want to be 'easy' to help 🙂

 

I am trying to show 4 weeks of data in a chart, which is easy, but on the same power bi page in a different chart, show the most recent week worth of data too. I have the data automatically uploading from a database source.

The data I have currently looks like this in my query, with the current chart showing the equipment name on x axis, and the OEE percentages on Y. There is a slider that is linked to Shift ISO column so that the last 4 weeks of data can be displayed. 

phippssyd00_0-1669842720339.png

phippssyd00_0-1669898179902.png

 

Is there any way to make a chart that only shows the last week's worth of data based on the time of accessing the power bi? thank you!

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a measure, measures can change dynamically with filtering

Measure SUMX(FILTER('Table (2)','Table (2)'[Shift ISO Week of Year]=WEEKNUM(NOW(),2)-1),[%OEE])

This measure is to filter out the list based on the time before to find the relevant value of the previous week

Then create the chart and put the measure in Y axis, the values of the previous week are displayed

 

vxinruzhumsft_0-1669961997943.png

 

 

 

 

 

Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a measure, measures can change dynamically with filtering

Measure SUMX(FILTER('Table (2)','Table (2)'[Shift ISO Week of Year]=WEEKNUM(NOW(),2)-1),[%OEE])

This measure is to filter out the list based on the time before to find the relevant value of the previous week

Then create the chart and put the measure in Y axis, the values of the previous week are displayed

 

vxinruzhumsft_0-1669961997943.png

 

 

 

 

 

Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors