Forum Discussion

gcyoung123's avatar
gcyoung123
New Member
4 years ago

Line chart which automatically shows data from the selected week, and last week's data

Hi There, 

 

I'm pretty new to Power BI And after some quick digging wasn't able to find a topic on this specifically, though I imagine it has a fairly easy solution. 

 

I have a report where I've added a drop-down list to filter for the week commencing X Date, e.g. WC 15 Aug 2022. 

 

I then have a value, 'Completion Rate'. I want to create a very simple line graph that shows the completion rate for this week, e.g. 15th Aug, vs the completion rate for last week e.g. w.c. 08 Aug. 

 

I've written a measure to calculate the value for the previous week. However, the issue is that because I've used a measure to calculate it based on wc 15 August, both values show up at the same point on the X axis (e.g. I have two points one above the other, both on the 15 aug, instead of a straight line from the 7th to the 15th). 

 

I already have the X-Axis linked to the week values. And I want to avoid a second drop down menu / using a slider to pick a date range rather than just checking the start of the week. My data is set up something like the below, where I already have a column that provides the week start date from the date.  

 

E.g: 

 

W/CDateCompletion Rate
15-Aug-2221-Aug-2269%
15-Aug-2220-Aug-2268%
15-Aug-2219-Aug-2272%
15-Aug-2218-Aug-2271%
15-Aug-2217-Aug-2265%
15-Aug-2216-Aug-2276%
15-Aug-2215-Aug-2245%
08-Aug-2214-Aug-2265%
08-Aug-2213-Aug-2264%
08-Aug-2212-Aug-2285%
08-Aug-2211-Aug-2276%
08-Aug-2210-Aug-2251%
08-Aug-2209-Aug-2262%
08-Aug-2208-Aug-2266%
01-Aug-2207-Aug-2250%

 

Any ideas how I can do this?

 

Thanks in advance

1 Reply

  • "this week" has many different meanings.  Can you garantee that your import mode dataset is updated daily?