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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Create # of Slicers dynamically based on nonNull columns

Hello All,

I want to create Slicer visuals based on columns retuned in data. 

 

For example: 

As shown in below image, I have fields like AreaLevel1, AreaLevel2, AreaLevel3 etc.. 

 Most time these columns have values upto level 3 but sometimes AreaLevel4 or AreaLevel5 might have values. 

 

3333.JPG

I want to determine first if column has any nonNull value which makes it eligible column for this case. 

I want to create Slicers on page for each column that has values. 

 

Kindly help. 

1 ACCEPTED SOLUTION
AnkitBI
Solution Sage
Solution Sage

Hi @Anonymous 

 

We can't create dynamic slicers in Power BI. To create Slicers you need to Drag drop Columns into Report canvas. So, fields will always be shown even all are Null or NonNull values.

 

Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.

 

 

View solution in original post

7 REPLIES 7
AnkitBI
Solution Sage
Solution Sage

Hi @Anonymous 

 

We can't create dynamic slicers in Power BI. To create Slicers you need to Drag drop Columns into Report canvas. So, fields will always be shown even all are Null or NonNull values.

 

Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.

 

 

Anonymous
Not applicable

Yes that I am aware of. I was just wondering if there was a way. 

Thanks for your time 

Anonymous
Not applicable

@AnkitBI Thanks for your time Ankit. 

 

I actually got an alternate solution. and I am puttint it here so others can use it. 

I am using this custom visual for Slicers which let me put multiple fields in slicers as hierarchy and also gives flexibility to hide empty columns. 

 

44.JPG

 

As displayed in image, it shows only 5 columns but actually there wer 15 columns added in field well (totally emptry columns are not displayed)

Hi - Great.. Which Custom slicer are you using??
Anonymous
Not applicable

Ok Thanks

Ok. Then the answer is "NO", not possible to create dynamic slicers

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.