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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Gilad
Frequent Visitor

switch between blank and non blank value in slicer

Hi  , 

I have 2 star schemas in my model with common dimensions : sales and plan 

Not all sales have plan value and that is causing plan measure to be blank when comparing to sales measures.

 

I want to create a slicer which I can switch between "price is blank" and "price is not blank" values so I will be able to show only records which have both sales and price plan.

 

I added a Plan flag  to planTable as follow :

Plan flag = if(ISBLANK(PlanTable[PricePlan]),"price is blank" , "price is not blank")
But it seems that it give incorrect result as all records are equal to  "price is not blank"
 
pibx file is available with all sample data and computation in it , I didn't find a way to upload it.

 

image.pngimage.png

 

image.png

 
4 REPLIES 4
FreemanZ
Super User
Super User

Hi @Gilad ,

 

A measure couldn't be used in a slicer or only a column could be used to feed a slicer. Try to add a calculated column and feed the slicer then. 

hi @FreemanZ  , 

When I tried to add calculated column , it give a wrong result as "not missing" in all cases even if the value does not exists in the Price_Plan table.

 

Plan Flag = if(ISBLANK(AVERAGE('PRICE_PLAN'[price_plan])) ,"missing" , "not missing")

hi @Gilad ,

 

try like:
Plan Flag = if(ISBLANK('PRICE_PLAN'[price_plan]) ,"missing" , "not missing")

Gilad
Frequent Visitor

Basically , the idea is to create a slicer that can switch between "is blank" and "is not blank" as it exists in filters

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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