Reply
Frequent Visitor
Posts: 11
Registered: ‎11-11-2016
Accepted Solution

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

[ Edited ]

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

 

 


Accepted Solutions
Established Member
Posts: 248
Registered: ‎09-21-2016

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 ?

View solution in original post


All Replies
Super User
Posts: 1,666
Registered: ‎05-10-2016

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

[ Edited ]

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




Frequent Visitor
Posts: 11
Registered: ‎11-11-2016

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

[ Edited ]

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. 

Super Contributor
Posts: 3,609
Registered: ‎09-27-2016

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

Frequent Visitor
Posts: 11
Registered: ‎11-11-2016

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

[ Edited ]

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!

 

 

 

 

Established Member
Posts: 230
Registered: ‎03-31-2016

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)
Highlighted
Frequent Visitor
Posts: 11
Registered: ‎11-11-2016

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. 

Established Member
Posts: 248
Registered: ‎09-21-2016

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?

Frequent Visitor
Posts: 11
Registered: ‎11-11-2016

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

Correct, no other data. 

Established Member
Posts: 248
Registered: ‎09-21-2016

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 ?