cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gianmarco
Helper IV
Helper IV

When applying a filter, show always one value as well as the selected option

Dear All,

When applying a filter I want the result to always show one value, as well as the selected option.

The fields are as below:

0

1

2

3

I want the filter to only show options 1, 2 & 3.

When a user selects 1, 2 or 3 I want all items connected with value 0 to also remain in the visualized results.

Is there a way I can obtain this result?

Thank you

gianmarco

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @gianmarco ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1680140183879.png

Please try:

First add a new table for slicer:

For Slicer = 
var _a = FILTER(SUMMARIZE('Table',[Column1]),[Column1]<>0)
var _b = CROSSJOIN({0},_a)
var _c = ADDCOLUMNS(_a,"Value",[Column1])
return UNION(_b,_c)

Output:

vjianbolimsft_1-1680141303676.png

Then create a relationship between the two tables:

vjianbolimsft_2-1680141394631.png

Create a slicer:

vjianbolimsft_3-1680141467649.png

Final output:

vjianbolimsft_4-1680141494331.png

vjianbolimsft_5-1680141504202.png

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @gianmarco ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1680140183879.png

Please try:

First add a new table for slicer:

For Slicer = 
var _a = FILTER(SUMMARIZE('Table',[Column1]),[Column1]<>0)
var _b = CROSSJOIN({0},_a)
var _c = ADDCOLUMNS(_a,"Value",[Column1])
return UNION(_b,_c)

Output:

vjianbolimsft_1-1680141303676.png

Then create a relationship between the two tables:

vjianbolimsft_2-1680141394631.png

Create a slicer:

vjianbolimsft_3-1680141467649.png

Final output:

vjianbolimsft_4-1680141494331.png

vjianbolimsft_5-1680141504202.png

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors