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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

)

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

)

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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