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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Phonetic
New Member

Text Slicer for multiple Rows

Hi everyone,

I'll first try to explain how my data is structured. I have a table in which each row represents a project. People from different departments are assigned to this project.

There is a column for each department, which can either be empty or contain one or more abbreviations of names.

ProjectnameSalesQualityProjectmanagementLogistic
Project XMM FFOO
Project YPPIIFFCC
Project ZZZRRWW 

 

 

There is also a table that assigns the name abbreviations to the correct person (MM ; Max Mustermann)

abbreviationFull namedepartments
MMMax MustermannSales
FFFrench FriesProjectmanagement
CCClumy ClownLogistic
.........

I would now like to create a slicer that searches through all columns based on an entered abbreviation and shows me each project where this abbreviation appears in one of the columns. So I want to see which projects, for example, MM is assigned to.

 

Thank you! 🙂 

 

1 ACCEPTED SOLUTION

PBI works best with tabular format and others might not be very efficient.
If you need a filter for your structure anyway, you can try this approach:
(1) add a measure that will be used as visual level filter

ProjectFilter = 
VAR _selAbbrev = SELECTEDVALUE(tbl2a[abbreviation], 0)
VAR _sales = SELECTEDVALUE(tbl2[Sales])
VAR _logistic = SELECTEDVALUE(tbl2[Logistic])
VAR _pm = SELECTEDVALUE(tbl2[Projectmanagement])
VAR _quality = SELECTEDVALUE(tbl2[Quality])
RETURN
IF(
    ISFILTERED(tbl2a[Full name]), 
    IF(_sales = _selAbbrev || _logistic = _selAbbrev || _pm = _selAbbrev || _quality = _selAbbrev, 1, 0),
    1
)

(2) add it to visual that you want to be filtered, ie. table

wini_R_1-1740056240019.png

 

(3) outcome

wini_R_2-1740056277416.png

 

View solution in original post

6 REPLIES 6
Phonetic
New Member

and depivotisation would not be the best solution either, as there is a lot more data in the table and i would like to retain the structure. But thank you!!

PBI works best with tabular format and others might not be very efficient.
If you need a filter for your structure anyway, you can try this approach:
(1) add a measure that will be used as visual level filter

ProjectFilter = 
VAR _selAbbrev = SELECTEDVALUE(tbl2a[abbreviation], 0)
VAR _sales = SELECTEDVALUE(tbl2[Sales])
VAR _logistic = SELECTEDVALUE(tbl2[Logistic])
VAR _pm = SELECTEDVALUE(tbl2[Projectmanagement])
VAR _quality = SELECTEDVALUE(tbl2[Quality])
RETURN
IF(
    ISFILTERED(tbl2a[Full name]), 
    IF(_sales = _selAbbrev || _logistic = _selAbbrev || _pm = _selAbbrev || _quality = _selAbbrev, 1, 0),
    1
)

(2) add it to visual that you want to be filtered, ie. table

wini_R_1-1740056240019.png

 

(3) outcome

wini_R_2-1740056277416.png

 

Thank you so much! This works perfectly 🙂 

wini_R
Solution Supplier
Solution Supplier

Hey @Phonetic,

The easierst way to solve this would be:
(1) unpivoting your top table to this format:

wini_R_0-1740049128100.png

(2) creating a relationship between the tables

wini_R_1-1740049158354.png

(3) adding a table (or other visual) and a slicer to the report

wini_R_4-1740049584420.png

 

 

 

I have also thought about connecting the two tables, but I can only create relations between two columns and not one column to several columns in the other table, right?

After unpivoting your table those multiple columns would become just one column - see Depart. column in the first screen shot. Then you can easily use it to connect tables

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors