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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Ashwani94kr
New Member

How to used column as filter in visual

I have table Q1 with column name of subject - English, Maths, Physics, Biology, ICT 

I like to use column name as filter in visual such that when i click on particular subject it show only visual related to that subject only

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Ashwani94kr ,

Please try to unipovt the subject columns. Like the following :

vrongtiepmsft_0-1681960308499.png

Then you can put the subject into the slicer and filter then.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjRV0sFKJCrF6gClzUB8LEQSRNocxMdCJEOkLUB8LEQqRNoSxMdCpICljQyATGxEmlJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [English = _t, Maths = _t, Physics = _t, Biology = _t, ICT = _t, #"name " = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"English", Int64.Type}, {"Maths", Int64.Type}, {"Physics", Int64.Type}, {"Biology", Int64.Type}, {"ICT", Int64.Type}, {"name ", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"name "}, "Attribute", "Value")
in
    #"Unpivoted Columns"

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Ashwani94kr ,

Please try to unipovt the subject columns. Like the following :

vrongtiepmsft_0-1681960308499.png

Then you can put the subject into the slicer and filter then.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjRV0sFKJCrF6gClzUB8LEQSRNocxMdCJEOkLUB8LEQqRNoSxMdCpICljQyATGxEmlJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [English = _t, Maths = _t, Physics = _t, Biology = _t, ICT = _t, #"name " = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"English", Int64.Type}, {"Maths", Int64.Type}, {"Physics", Int64.Type}, {"Biology", Int64.Type}, {"ICT", Int64.Type}, {"name ", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"name "}, "Attribute", "Value")
in
    #"Unpivoted Columns"

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

FreemanZ
Super User
Super User

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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