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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
and2022
New Member

How to do make a selection list

Hi community,

 

I am new to Power BI and have learned a lot from your posts. Thank you all very much.

Today I met a question. Any answer and hint are much appreciated.

I have a table like, 

Type 1Type 2Type 3id
YesYesYes1
NoNoYes2
YesNoNo3

I want to add a filter on dashboard, which lists 3 values: A, B and C

when I select A, I want to the charts to show Type 2 = Yes. when I select B, I want the records with Type 3 = Yes. When I select C, I want to see all records. How to do this?

 

Thanks in advance!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@and2022 , Unpivot the type column in power bi, and create A,B,C  when the type is yes

 

Or you need to have table with A,b,c as rows, and based on each selection return values

 

Switch(selectedvalues(Type[Type]),

"A",calculate(Count(Table[id]), filter(Table, Table[Type1] ="Yes")) ,

"B",calculate(Count(Table[id]), filter(Table, Table[Type2] ="Yes")) ,

"C",calculate(Count(Table[id]), filter(Table, Table[Type3] ="Yes"))

)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
and2022
New Member

Got it. Thank you.

amitchandak
Super User
Super User

@and2022 , Unpivot the type column in power bi, and create A,B,C  when the type is yes

 

Or you need to have table with A,b,c as rows, and based on each selection return values

 

Switch(selectedvalues(Type[Type]),

"A",calculate(Count(Table[id]), filter(Table, Table[Type1] ="Yes")) ,

"B",calculate(Count(Table[id]), filter(Table, Table[Type2] ="Yes")) ,

"C",calculate(Count(Table[id]), filter(Table, Table[Type3] ="Yes"))

)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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