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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
WBscooby
Helper III
Helper III

Matrix containing dates relative to slicer filter

Hi

 

I suspect what I am trying to achieve is quite easy but I have tried various ways with no luck!

 

My report is looking at weekly data. The data is calculated elsewhere and imported as a table.

 

The table has summary data for several dates but for the purpose of the report, only data that falls on a Friday (end of week) is required.

 

Based on the data selected in the slicer, I would like to dynamically display 3 weeks of data taking the slicer date as the latest date e.g. date selected = 29/10/21, the 3 weeks will be 15/10/21, 22/10/21, 29/10/21. If date selected is 22/10/21, the 3 weeks will be 08/10/21, 15/10/21 and 22/10/21

 

I have written a measure to try to identify the dates in the range but I can’t work out how to translate this into the columns!

 

Dates in period =

Var _MaxDate = MAX('Slicer Date'[Slicer Date])

vAR _MinDate = _MaxDate-14

Return

DATESBETWEEN('Date'[End Day of Week Friday],_MinDate,_MaxDate)

Any help would be appreciated - sample file attached.

 

Thank you

 

https://1drv.ms/u/s!Ap6q8W-mvm27g-c8oKb54c89mou7_A?e=GY7Kh5

1 ACCEPTED SOLUTION
hmahesh94
Helper I
Helper I

Hi @WBscooby ,

 

I believe you have a similar situation that is solved below:

Select last 6 months based on user single selection 

 

This is a great video and it is very clearly explained. Hope this helps

 

If you think my suggestion answered your question, please give it a like and Accept it as a solution.

 

Cheers!

View solution in original post

2 REPLIES 2
hmahesh94
Helper I
Helper I

Hi @WBscooby ,

 

I believe you have a similar situation that is solved below:

Select last 6 months based on user single selection 

 

This is a great video and it is very clearly explained. Hope this helps

 

If you think my suggestion answered your question, please give it a like and Accept it as a solution.

 

Cheers!

Awesome - thank you! This worked perfectly and the video was really clear so helped me understand what I was doing rather than just copying a bit of code!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.