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
cricex
Frequent Visitor

Slicer item with no data is showing up even though "Show item with now data" is unchecked

As you can see below, December shows up as a slicer option even though the values do not go beyond November. 

 

sales by short month.PNG

 

This happens with any table I try to visualize and slice, but I thought perhaps dates would be the simplest way to show. In the example, I simply have a Facts table with a Sales amount and a Dates table with various date options. The report is filtered to only show the year 2016.

 

I have found other topics which suggest to make sure the X axis is set to Categorical, which it is:

 

sales by short month2.PNG

 

 sales by short month 3.PNG

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

"Single" cross filter direction from DimDates to Facts ?

View solution in original post

10 REPLIES 10
gooranga1
Power Participant
Power Participant

On our date dimension table I have a calculated column to work out if a date is in the future. So I can just use the filter to make sure all dates are zero which excludes any future dates. Column calculation below.

 

FutureDay = if([Date]>date(year(now()),month(now()),day(now())) ,1,0)

OK, that is a novel idea.

 

I wonder if I can make a filter similar to this to filter out data from other tables (like Customers or Products) so that it doesn't show options that are filter out for those as well. 

Anonymous
Not applicable

@cricex,

I have a very similar report and your approach works just fine for me.  

 

Obvious questions - there's no other data on the report interacting with that slicer which might be forcing it to include December - e.g. Budget data?

Correct, no other data. 

Anonymous
Not applicable

"Single" cross filter direction from DimDates to Facts ?

I think that was it! Just set it up and desktop and pushing it to the service to make sure, but it looks like that was exactly what I was looking for.

 

Thank you so much, I'm relieved that it was a simple, yet elegant solution. 

Vvelarde
Community Champion
Community Champion

@cricex

 

One way to solve this is:

 

Create a New Table:

 

Months = SUMMARIZE(FILTER('Calendar',CALCULATE(SUM('Values-2016'[Values])>0)),'Calendar'[Month],'Calendar'[Month-Number])

 

If December is 0 values in your table: the new table would be from January to November

 

Made the relationship:

 

img1.png

 

And Use Month from Months in the Slicer.




Lima - Peru

Thanks for the reply, @Vvelarde

 

 

One way to solve this is: Create a New Table

 

I don't think that is a viable solution because I would then need to create a new table for every slicer that can potentially be used, which are hundreds. 

Hi @cricex,

>>The report is filtered to only show the year 2016.

 

In your slicer, it includes month, how do you show the 2016 year's data?

 

>>create a new table for every slicer that can potentially be used, which are hundreds.

 

Could you please describe your requirement clearly for further analysis?

 

Best Regards,

Angelia

Hello @v-huizhn-msft

 

In your slicer, it includes month, how do you show the 2016 year's data?

 

There is a report filter circled in the screenshot showing Year to be explicitly set to 2016.

 

Could you please describe your requirement clearly for further analysis?

 

My requirements are to not show options in slicers that do not have data. In the screenshot, you can see in the graph that the data stops in November. Therefore, the slicer should end in November as well.

 

Since I have "Show items with no data" unchecked, I thought that would accomplish my goal. However, it doesn't seem to work the same way I assumed it would, which is how it works in Excel. 

 

 

Thank you!

 

 

 

 

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.

Top Solution Authors