cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cricex Frequent Visitor
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

Accepted Solutions
Steve_Wheeler Established Member
Established Member

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

"Single" cross filter direction from DimDates to Facts ?

10 REPLIES 10
Super User
Super User

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

@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
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




cricex Frequent Visitor
Frequent Visitor

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

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. 

v-huizhn-msft Super Contributor
Super Contributor

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

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

cricex Frequent Visitor
Frequent Visitor

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

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!

 

 

 

 

Highlighted
gooranga1 Senior Member
Senior Member

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

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

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

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. 

Steve_Wheeler Established Member
Established Member

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

@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?

cricex Frequent Visitor
Frequent Visitor

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

Correct, no other data. 

Steve_Wheeler Established Member
Established Member

Re: Slicer item with no data is showing up even though "Show item with now data" is unchec

"Single" cross filter direction from DimDates to Facts ?