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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
asheyashey
Helper I
Helper I

I have a date column.I want to create a slicer for Week View/ monthly view.

As title says.
I also have one column with just WeekNos.

asheyashey_0-1759318005566.png

The weekly view should consist of only the next week.( eg 1-10-2025 is week no 40.So it should show only week no 41 data.)
The monthly view to show normally month wise.

I was thinking of using New parameter in modelling to create it but hit a blocker with the next week criteria.

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @asheyashey 

Could you please try below Steps:

1. Sample date table I used to solve the problem.

image.png 

 

 

 

 

 

 

 

 

 

 

 

 

2. Create Table

ViewSelector = 
DATATABLE(
    "View", STRING,
    {
        {"Weekly View"},
        {"Monthly View"}
    }
)


3. Create Measure

ShowData = 
VAR CurrentWeek = WEEKNUM(TODAY(), 2)   // Today = 1 Oct 2025 => Week 40
VAR NextWeek = CurrentWeek + 1          // NextWeek = 41
VAR SelectedView = SELECTEDVALUE(ViewSelector[View])
RETURN
SWITCH(
    TRUE(),
    SelectedView = "Weekly View" && SELECTEDVALUE('Sheet1'[WeekNo]) = NextWeek, 1,
    SelectedView = "Monthly View", 1,
    0
)

 

4. Drag the ShowData measure into the visual-level filter.
Set the filter condition → ShowData = 1.

image.png

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

9 REPLIES 9
v-karpurapud
Community Support
Community Support

Hi @asheyashey 

Thank you for submitting your question to the Microsoft Fabric Community Forum, and thanks to @rohit1991 and @lbendlin  for offering helpful suggestions.

 

Could you let us know if the suggested solution resolved your issue?If you still need help, please share more details so we can assist you further.

Thank you.

lbendlin
Super User
Super User

Weeks and Months are generally incompatible.  Your best approach will be an externally maintained Calendar table where you clearly spell out what week (of the year or the quarter or the month) you want each day to be in.

I tried that but even then im stuck in a blocker.
I tried creating a custom blocker showing Next week dates only but even then there is blank values column which I cant remove as i also have months slicer also to consider.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Just updating was still facing some issue and i went with the button and bookmark route.

Hi,

Thank You for the update. If you have any further questions, please let us know. we can assist you further.

 

Regards,

Microsoft Fabric Community Support Team.

lbendlin
Super User
Super User

Weeks and Months are generally incompatible.  Your best approach will be an externally maintained Calendar table where you clearly spell out what week (of the year or the quarter or the month) you want each day to be in.

rohit1991
Super User
Super User

Hi @asheyashey 

Could you please try below Steps:

1. Sample date table I used to solve the problem.

image.png 

 

 

 

 

 

 

 

 

 

 

 

 

2. Create Table

ViewSelector = 
DATATABLE(
    "View", STRING,
    {
        {"Weekly View"},
        {"Monthly View"}
    }
)


3. Create Measure

ShowData = 
VAR CurrentWeek = WEEKNUM(TODAY(), 2)   // Today = 1 Oct 2025 => Week 40
VAR NextWeek = CurrentWeek + 1          // NextWeek = 41
VAR SelectedView = SELECTEDVALUE(ViewSelector[View])
RETURN
SWITCH(
    TRUE(),
    SelectedView = "Weekly View" && SELECTEDVALUE('Sheet1'[WeekNo]) = NextWeek, 1,
    SelectedView = "Monthly View", 1,
    0
)

 

4. Drag the ShowData measure into the visual-level filter.
Set the filter condition → ShowData = 1.

image.png

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

I tried it but im getting an empty chart while doing this. Can you please give me a more detailed explaination,

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors