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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
venal
Memorable Member
Memorable Member

Dax Help

Hello Folks,

 

I have a Data with the column names "Date and Num". I want only show the slicer value as "1,4,13,52" weeks. How to achieve this with the DAX (weeknum).

 

Note:- Currently i used "weeknum" dax function and created one more column as week, It is showing the week number from 1-52.But as per the requirement wanna show only 4 values in slicer visual.

 

Thank you in advance.

BR

venal.

 

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @venal ,

 

You can create a calculate column in your date table.

 

4 Week Nos =

SWITCH(
TRUE(),
'Date'[Week Number] = 1 , 1,
'Date'[Week Number] = 4, 4,
'Date'[Week Number] = 13 , 13,
'Date'[Week Number] = 52 , 52,
BLank()
 
)
 
 
and in slicer visual
 
3.JPG
 
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @venal ,

 

You can create a calculate column in your date table.

 

4 Week Nos =

SWITCH(
TRUE(),
'Date'[Week Number] = 1 , 1,
'Date'[Week Number] = 4, 4,
'Date'[Week Number] = 13 , 13,
'Date'[Week Number] = 52 , 52,
BLank()
 
)
 
 
and in slicer visual
 
3.JPG
 
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

@harshnathani 

Thank you for the reply.

I will check and revert.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.