Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello everyone, i cant seem to understand the logic behind the filtering in matrix
i am adding a measure called weekcheck to filter out dates based on a number range paramater to go back x number of weeks compared to today's week
Week check =
VAR ReferenceDate =
CALCULATE(MAX( dimDate[StartOfWeek] ), REMOVEFILTERS(dimDate))
VAR NumDays =
SELECTEDVALUE ( Parameter[Parameter] ) * 7
RETURN
IF ( ( ReferenceDate - NumDays ) <= MAX(dimDate[StartOfWeek]), 1 )
if i do the matrix like this i get the results i need
however the way i want to display it is putting the startofweek in the column of the matrix not row
and as soon as i do this, the filter breaks and doesnt work
as you see i have way more data back from the start of my dataset?
why is this happening and how to fix it please
Solved! Go to Solution.
Hi @eliasayyy
Try creating a filtered measure instead
Filtered Measure =
VAR ReferenceDate =
CALCULATE ( MAX ( dimDate[StartOfWeek] ), REMOVEFILTERS ( dimDate ) )
VAR NumDays =
SELECTEDVALUE ( Parameter[Parameter] ) * 7
VAR StartDate = ReferenceDate - NumDays
RETURN
CALCULATE ( [your measure], KEEPFILTERS ( dimDate[StartOfWeek] >= StartDate ) )
Hi @eliasayyy ,
I would also take a moment to thank @danextian , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi @eliasayyy ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Hi @eliasayyy
Try creating a filtered measure instead
Filtered Measure =
VAR ReferenceDate =
CALCULATE ( MAX ( dimDate[StartOfWeek] ), REMOVEFILTERS ( dimDate ) )
VAR NumDays =
SELECTEDVALUE ( Parameter[Parameter] ) * 7
VAR StartDate = ReferenceDate - NumDays
RETURN
CALCULATE ( [your measure], KEEPFILTERS ( dimDate[StartOfWeek] >= StartDate ) )
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 41 | |
| 30 | |
| 24 |