cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YongJiang
Helper II
Helper II

Using visual to filter data for slicers

Hello there,

 

I have a page with a treemap visual, a bar chart visual, some cards with numbers, and some slicers on top of them. The treemap visual can be used as a filter to filter data for the bar chart and cards but it has no effect on the data underlying the slicers. I can get CROSSFILTER function to filter data between slicers (that is to filter data for slicer B using data in slicer A) but this does not work for the treemap visual. With CROSSFILTER function it works to change the underlying data for the other slicers if the treemap is turned into a slicer itself. But I need to keep the treemap.

 

Because of this, when I click a point in the treemap, I'll see changes on my bar chart and the cards, and then I keep going by selecting a value in a slicer, the bar chart and the cards can go blank, as there is no data for the selected item in the slicer.

 

Is there a way to make sure the page does not go blank?

 

Any advice is appreciated.

Yong

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User IV
Super User IV

@YongJiang ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Hi @YongJiang 

Let's call values you select in Treemap = ValueA, values you select in SlicerA = ValueA and values you select in SlicerB = ValueB.

Treemap won't crossfilter SlicerB like SlicerA. So though you select in Treemap, there may still exist ValueBs not in the value you select in treemap.

I build a sample to have a test.

1.png

I select A in treemap and select d in Slicer B, however there is no d in A, so card visual shows blank.

2.png

If you want to show a warning message, you may build a measure.

M.Value = IF(SUM('Table'[value])=BLANK(),"warning message",SUM('Table'[value]))

Result:

3.png

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

4 REPLIES 4
amitchandak
Super User IV
Super User IV

@YongJiang ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

It's the issue with blank values. I kind of found a solution by placing a warning message there when there is a blank value. Nothing else seems to work.

Thanks

Yong

Hi @YongJiang 

Let's call values you select in Treemap = ValueA, values you select in SlicerA = ValueA and values you select in SlicerB = ValueB.

Treemap won't crossfilter SlicerB like SlicerA. So though you select in Treemap, there may still exist ValueBs not in the value you select in treemap.

I build a sample to have a test.

1.png

I select A in treemap and select d in Slicer B, however there is no d in A, so card visual shows blank.

2.png

If you want to show a warning message, you may build a measure.

M.Value = IF(SUM('Table'[value])=BLANK(),"warning message",SUM('Table'[value]))

Result:

3.png

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

Hi Rico

That was exactly the issue and also the solution i found in the end.

thank you

Yong

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.