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
mason23
Helper I
Helper I

Slicer

Hello Community,

How do I put this into a slicer where it has only two selections (yes or no)?

 

JanFebMarAprilMayJunJulAugSept
Yesyesnoyesyesnoyesnoyes
Noyesnoyesnonoyesnoyes
No yesno noyesnoyesnoyes

Thank you

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mason23 ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Add a index column in Power Query Editor

2. Select all columns with month name and unpivot them in Power Query Editor

yingyinr_0-1647572280135.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqkwtVtKBknn5cCaGAJwZqxONVRzKJFYLHiPAWmIB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Jan = _t, Feb = _t, Mar = _t, April = _t, May = _t, Jun = _t, Jul = _t, Aug = _t, Sept = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Jan", type text}, {"Feb", type text}, {"Mar", type text}, {"April", type text}, {"May", type text}, {"Jun", type text}, {"Jul", type text}, {"Aug", type text}, {"Sept", type text}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
    #"Reordered Columns" = Table.ReorderColumns(#"Added Index",{"Index", "Jan", "Feb", "Mar", "April", "May", "Jun", "Jul", "Aug", "Sept"}),
    #"Unpivoted Only Selected Columns" = Table.Unpivot(#"Reordered Columns", {"Jan", "Feb", "Mar", "April", "May", "Jun", "Jul", "Aug", "Sept"}, "Months", "Status")
in
    #"Unpivoted Only Selected Columns"

3. Create a slicer using the field "Status"

4. Create a matrix visual(Rows: Index   Columns:Months  Values: Status )

yingyinr_1-1647572477444.png

If the above one is not your expected result, please provide some raw data(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file in order to provide you a suitable solution. Thank you.

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @mason23 ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Add a index column in Power Query Editor

2. Select all columns with month name and unpivot them in Power Query Editor

yingyinr_0-1647572280135.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqkwtVtKBknn5cCaGAJwZqxONVRzKJFYLHiPAWmIB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Jan = _t, Feb = _t, Mar = _t, April = _t, May = _t, Jun = _t, Jul = _t, Aug = _t, Sept = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Jan", type text}, {"Feb", type text}, {"Mar", type text}, {"April", type text}, {"May", type text}, {"Jun", type text}, {"Jul", type text}, {"Aug", type text}, {"Sept", type text}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
    #"Reordered Columns" = Table.ReorderColumns(#"Added Index",{"Index", "Jan", "Feb", "Mar", "April", "May", "Jun", "Jul", "Aug", "Sept"}),
    #"Unpivoted Only Selected Columns" = Table.Unpivot(#"Reordered Columns", {"Jan", "Feb", "Mar", "April", "May", "Jun", "Jul", "Aug", "Sept"}, "Months", "Status")
in
    #"Unpivoted Only Selected Columns"

3. Create a slicer using the field "Status"

4. Create a matrix visual(Rows: Index   Columns:Months  Values: Status )

yingyinr_1-1647572477444.png

If the above one is not your expected result, please provide some raw data(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file in order to provide you a suitable solution. Thank you.

Best Regards

Hi,

Thanks for replying. This method is what I expected. 

lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?


https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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 Fabric 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