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
AMaxfield
Regular Visitor

Measure a column of numbers or blanks to create a slicer with yes or no

Hi All

 

I have acolumn of data for stock demand whcih either has many number vlaues or blank cells.

I want to include a clicer in the report with just two options for either demand yes or no.

So basically where there is a blank it will be demand no and any number will be demand yes.

Can you please point me in the right direct how to set this up? Thanks Andy

2 ACCEPTED SOLUTIONS
Thim
Resolver V
Resolver V

You can create a new Column with a Dax formula like this.

 

Blank Slicer = IF('Table'[Column1]=BLANK();"No";"Yes")
 
Then you can use the new column as a filter.
 
Hope this will help. 🙂

View solution in original post

rajulshah
Super User
Super User

Hello @AMaxfield,

 

You can create a calculated column as below:
Demand Yes/No = IF(ISBLANK(Table[Stock Demand]),"No","Yes")

You can use this column in the slicer.

 

 

View solution in original post

3 REPLIES 3
AMaxfield
Regular Visitor

Great thanks worked once I realised it was "New Column" rather than "New Measure"

rajulshah
Super User
Super User

Hello @AMaxfield,

 

You can create a calculated column as below:
Demand Yes/No = IF(ISBLANK(Table[Stock Demand]),"No","Yes")

You can use this column in the slicer.

 

 

Thim
Resolver V
Resolver V

You can create a new Column with a Dax formula like this.

 

Blank Slicer = IF('Table'[Column1]=BLANK();"No";"Yes")
 
Then you can use the new column as a filter.
 
Hope this will help. 🙂

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.