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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
acroft62
New Member

How do I restrict data appearing in my matrix based on a Week No or Month ?

Hi,

 

I want to filter the data appearing in 2 matrices according to the Week No and Month Name., such that when the report opens up these filters are automatically applied; subsequently a user (if they so desire) can change the filtered week/month name.

 

NB Assume current Week no and Month name are deriveable from the source and can be stored in aggregates/variables.

 

Thanks

 

Tony

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

Hi, @acroft62 

 

If you have 'Week No' column and 'Month Name' column in your report, You can create two single lists(new tables) and use the two as slicers,then create a measure,use it in matrix filter pane.

Like this:

Table mon = DISTINCT('Table'[Month name])
Table week = DISTINCT('Table'[Week no])

Measure =
IF (
    SELECTEDVALUE ( 'Table mon'[Month name] )
        IN VALUES ( 'Table'[Month name] )
            && SELECTEDVALUE ( 'Table week'[Week no] ) IN VALUES ( 'Table'[Week no] ),
    1,
    0
)

2.png

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @acroft62 

 

If you have 'Week No' column and 'Month Name' column in your report, You can create two single lists(new tables) and use the two as slicers,then create a measure,use it in matrix filter pane.

Like this:

Table mon = DISTINCT('Table'[Month name])
Table week = DISTINCT('Table'[Week no])

Measure =
IF (
    SELECTEDVALUE ( 'Table mon'[Month name] )
        IN VALUES ( 'Table'[Month name] )
            && SELECTEDVALUE ( 'Table week'[Week no] ) IN VALUES ( 'Table'[Week no] ),
    1,
    0
)

2.png

 

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

amitchandak
Super User
Super User

@acroft62 , You can have column like this on you date table and use that as filter

 

Week Type = Switch( True(),
[start week]<=Today() && [end date]>=Today(),"This Week" ,
[start week]<=Today()-7 && [end date]>=Today()-7,"Last Week" ,
[Week Name]
)

 

 

Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" ,
Date([Date])= eomonth(Today(),0),"This Month" ,
[Month Year]
)

 

 

refer the video : https://www.youtube.com/watch?v=hfn05preQYA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit, thanks for replying. So when I have my date columns as you suggest in your video, are you saying that I just need to set the slicers to This Week and This Month for the report to always open on on these values ?

@acroft62 , yes, based on today the values should change automatically.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.