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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
AmarH94
Frequent Visitor

Selecting Multiple Values from Column to give me 1 or 0

Hi All, 

 

I am trying to select multiple values from a column to give me either a 1 or 0. 

 

So far I have only got one value as can be seen below: 

 

AmarH94_0-1634115023505.png

this is done by using this formula:

 

Total Dials = IF('CRT Outbound'[DISPOSITION]= "Dial Error",1,0)
 
How can I expand this formula to include other dispositions? 
 
Please can you help? 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AmarH94 , what values you need

 

example

Switch(true() ,

'CRT Outbound'[DISPOSITION]= "Dial Error",1,

'CRT Outbound'[DISPOSITION]= "No Answer",2,

//add others

 

0 //Default

)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

5 REPLIES 5
AmarH94
Frequent Visitor

Switch(true() ,

'CRT Outbound'[DISPOSITION]= "Dial Error",1,

'CRT Outbound'[DISPOSITION]= "No Answer",1,

//add others

 

0 //Default

)

 

this is the solution that worked for me 

amitchandak
Super User
Super User

@AmarH94 , what values you need

 

example

Switch(true() ,

'CRT Outbound'[DISPOSITION]= "Dial Error",1,

'CRT Outbound'[DISPOSITION]= "No Answer",2,

//add others

 

0 //Default

)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Actually this would work, I would just change the 2 to 1 and add other values I need. 

 

Thank you so much this helps a lot! 

So example Total Dial would need multiple values such as No Dial and No Answer, so under Total Dial both would have the value 1

@AmarH94 , if the above is not helping

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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