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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors