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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Zyg_D
Continued Contributor
Continued Contributor

Not showing data in slicer if corresponds to empty results

This is my data: 
data.PNG
model.PNG

And the report view (slicer + table): 
report.PNG
(the slicer is based on Table2[category])

The question: is there a way not to show "112" in the slicer if I do not have corresponding data in the related Table1? 
This is very simplified data, so I need an answer which will not include these
- creating a slicer based on Table1[category]
- explicitly filtering out "112" in filters pane

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Zyg_D , Create a measure in your fact .

 

M1= count(Table1[Category])

 

And put that into the visual level filter of Category from Table2 , check M1 is not blank

 

You can this video if needed, this for 2 slicers, but the logic is same - https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Zyg_D
Continued Contributor
Continued Contributor

A filter + measure count(Table1[Category]) really works - thanks, @amitchandak
amit_solution.PNG

Also, I was able to find my own solution, using only a filter based on Table1[sub_cat]) 
filter.PNG

View solution in original post

4 REPLIES 4
Zyg_D
Continued Contributor
Continued Contributor

A filter + measure count(Table1[Category]) really works - thanks, @amitchandak
amit_solution.PNG

Also, I was able to find my own solution, using only a filter based on Table1[sub_cat]) 
filter.PNG

Anonymous
Not applicable

The Show items with no data feature enables you to do exactly that - include data rows and columns that don't contain measure data (blank measure values).

To enable the Show items with no data feature select a visual, then in the Fields well, right-click the field and select Show items with no data from the menu that appears.

The Show items with no data feature does not have effect in the following circumstances:

  • There's no measure added to the visual, and the grouping columns come from the same table
  • Groups are unrelated; Power BI doesn't run queries for visuals that have unrelated groups
  • The measure is unrelated to any of the groups; this is because the measure will never be blank for only some group combinations
  • There's a user-defined measure filter that excludes blank measures - for example: SalesAmount > 0
Anonymous
Not applicable

amitchandak
Super User
Super User

@Zyg_D , Create a measure in your fact .

 

M1= count(Table1[Category])

 

And put that into the visual level filter of Category from Table2 , check M1 is not blank

 

You can this video if needed, this for 2 slicers, but the logic is same - https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors