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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Mederic
Post Patron
Post Patron

Hiding columns with a slicer in Excel-Power query

Hello everyone,
In the screenshot below, I have a table in which the columns are hidden via a table with a "Yes" or "No" column
However, I would like to get the same result using a slicer

Is this possible in Excel with Power query ?
For information, I actually have about ten columns and more than 1000 rows

Thank you in advance for your help
RegardsHid Column With Slicer.jpg

 

ABCDE
vbnfuyeyut
ytsqsqtfgd
tfsuygxsqe
gyudjvskop

 

Column NameHid
ANo
BNo
CYes
DNo
EYes

 

 

 

let
    Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", type text}, {"B", type text}, {"C", type text}, {"D", type text}, {"E", type text}}),
    #"Removed Other Columns" = Table.SelectColumns(#"Changed Type",Status)
in
    #"Removed Other Columns"


let
    Source = Excel.CurrentWorkbook(){[Name="Status"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column Name", type text}, {"Hid", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Hid] = "No")),
    #"Column Name" = #"Filtered Rows"[Column Name]
in
    #"Column Name"

 

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.