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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Slicer with date hierarchy - how to show only value

Dear all,

 

May I ask your advice for below issue?

 

I created a slicer with date hierarchy date; however, the slicer show all data of the periods, not only the real data of that field.

 

For example, data for 2019 I have only Jan, Feb, Mar but slicer show 12 months but actual there is no data of the other months.

 

Please advise how can I solve the issue but keep the hierarchy Year - Quaterly - Month.

 

Thanks so much!

 

Nguyen_0-1616226873496.png

 

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Anonymous 

You can filter your slicer with a measure that tests whether data exists in your fact table(s).


This would have the effect of removing items with no corresponding data.

 

The basic pattern is to create a measure like below, and apply it as a visual level filter on the slicer, filtered to 1.

 

SlicerFilter = INT ( NOT ISEMPTY ( FactTable ) )


See this article for some examples:

Syncing Slicers in Power BI 

 

Regards

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @Anonymous 

You can filter your slicer with a measure that tests whether data exists in your fact table(s).


This would have the effect of removing items with no corresponding data.

 

The basic pattern is to create a measure like below, and apply it as a visual level filter on the slicer, filtered to 1.

 

SlicerFilter = INT ( NOT ISEMPTY ( FactTable ) )


See this article for some examples:

Syncing Slicers in Power BI 

 

Regards

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Hello

i think i have the same problem, i have a table which is custommade from dates starting today till today+366, and i made a new column in which i wrote only 1's.

the i try to display as a slicer in which i put also the slicer filter to display only values in which the control value is 1, it display all the 2 whole years. if you have any sugestions please let me know. thank you

cristianj_0-1716812564658.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors