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
7otto8
New Member

How to show all filled columns in a matrix which contain sliced value

Hello,

 

I'm looking for a way to show all filled columns in a matrix after using a slicer to filter data down to a select few.

 

So I've created a fictive matrix with Company names as rows, employee names as values & Employee number as column.

 

My fictive matrix looks like this;

Company_name | Employee 1 | Employee 2 | Employee 3 | Employee 4 etc.

Company1          | Truus           | Henk            | Kees

Company2          | Kees            | Albert

Company3          | Hanz           | Eric               | Thomas       | Eduardo

 

Afterwards I've added a slicer for employee names in the hope to get the company + all employee names who work at the same company as Henk.

 

The result I get when I slice for Henk =

Company_name  | Employee 2 |

Company1          | Henk            | 

 

The result I wanted when I filter for Henk = 

Company_name | Employee 1 | Employee 2 | Employee 3 | Employee 4 etc.

Company1          | Truus           | Henk            | Kees

 

And if I were to filter Kees I'd wanted = 

Company_name | Employee 1 | Employee 2 | Employee 3 | Employee 4 etc.

Company1          | Truus           | Henk            | Kees

Company2          | Kees            | Albert

 

 

Is this possible to achieve?

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

Hi  @7otto8 ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[Value])

vyangliumsft_0-1686199119669.png

2. Create measure.

Measure =
var _select=SELECTEDVALUE('Table 2'[Value])
var _column=SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Value]=_select),"1",[Company_name])
return
IF(
    MAX('Table'[Company_name])  in _column,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1686199119670.png

4. Result:

vyangliumsft_2-1686199159795.png

 

Best Regards,

Liu Yang

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-yangliu-msft
Community Support
Community Support

Hi  @7otto8 ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[Value])

vyangliumsft_0-1686199119669.png

2. Create measure.

Measure =
var _select=SELECTEDVALUE('Table 2'[Value])
var _column=SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Value]=_select),"1",[Company_name])
return
IF(
    MAX('Table'[Company_name])  in _column,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1686199119670.png

4. Result:

vyangliumsft_2-1686199159795.png

 

Best Regards,

Liu Yang

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

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.