Forum Discussion

Dean_Mcghee's avatar
Dean_Mcghee
Frequent Visitor
3 years ago

Display all data for as set week range

I have a spreadsheet that has individual performance evaluations for each day and I need to create a dashboard that will display the averages of each persons numbers for a set week.  I have the date column in my data and I can create a slicer to pick the month and day but I have to manually hold Ctrl and select all the days of the week in the slicer.  

How do I create a measure where I select the first day and PowerBI adds the next 6 days to the filter?

If I choose September 5th, it will display all the data from the 5th to the 11th.

 

It can't be locked to the current month as well, there will be times when a work week will start in one month, and then end in the next.

 

 

2 Replies

  • Hi,

    Assuming the score appear in a single column, try this.  Create a Calendar Table with a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table.  Create a Date slicer from the Calendar Table.  Write these measures

    Average score = average(Data[Score])

    Average scores of week =  calculate([average score],datesbetween(calendar[Date],min(Calendar[date]),min(Calendar[date])+6))

    If this does not work, then share the download link of your PBI file.

    Hope this helps.