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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kerslaing
Helper I
Helper I

Filter a table by data that has multiple options

Hi,  I am creating a small software catalogue of software used across the organisation and by which departments

 

data is all in one table

softwarename  dep1 dep2 dep3

testsoftware1YESNONO
testsoftware2NOYESYES
testsoftware3YESNOYES
testsoftware4YESNONO
testsoftware5NONOYES

 

I  would like to create a slicer that allows the selection of a department and in a table visual shows all the software that the selected department has access to.

 

I had though of creating a power bi table with the departments for the slicer but then how do i get it to filter the software table when all it has is yes's and no's.

 

thanks for the help

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hello @Kerslaing ,

The best option is in the query editor to despivot your departments and get a table with 3 columns:

  • SoftwareName
  • Attribute (Department Names)
  • Value (yes/no)

You can then rename the columns and use the attribute column in the slicer to check the full code for the power query and the PBIX file below.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKkktLinOTyspTyxKNVTSUYp0DQaSfv4QIlYHVYURTA6iDESiKzFGNQSbEhOC9pgiyUHNiAUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [softwarename = _t, dep1 = _t, dep2 = _t, dep3 = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"softwarename"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Attribute", "Department"}, {"Value", "HasSoftware"}})
in
    #"Renamed Columns"

Then filter the visualizations by the value column.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hello @Kerslaing ,

The best option is in the query editor to despivot your departments and get a table with 3 columns:

  • SoftwareName
  • Attribute (Department Names)
  • Value (yes/no)

You can then rename the columns and use the attribute column in the slicer to check the full code for the power query and the PBIX file below.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKkktLinOTyspTyxKNVTSUYp0DQaSfv4QIlYHVYURTA6iDESiKzFGNQSbEhOC9pgiyUHNiAUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [softwarename = _t, dep1 = _t, dep2 = _t, dep3 = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"softwarename"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Attribute", "Department"}, {"Value", "HasSoftware"}})
in
    #"Renamed Columns"

Then filter the visualizations by the value column.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



That works great, thanks.

Don't forget to mark the correct answer to help others.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.