Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.