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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vishvz
New Member

CASE Statement to DAX

I want to create an expression like this using DAX  (new column) 

If fraudscore= 1 then return "TrancUSD" or else =0

 

 

Fraud score contain values 1 and 0.

 

regards

Vish

2 ACCEPTED SOLUTIONS
rocky09
Solution Sage
Solution Sage

@vishvz

try this

Column = IF(Table1[Fraud score]=1,"TranscUSD","0") 

View solution in original post

@vishvz

 

Are Fraudscore and TrancUSD columns??

 

Column =
IF ( Table1[Fraud score] = 1, Table1[TranscUSD], 0 )

Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
rocky09
Solution Sage
Solution Sage

@vishvz

try this

Column = IF(Table1[Fraud score]=1,"TranscUSD","0") 

not working 

@vishvz

Not working means? Can you please atleast provide the error which are getting? Also, Please post some data. So, we can help you on this.

@vishvz

 

Are Fraudscore and TrancUSD columns??

 

Column =
IF ( Table1[Fraud score] = 1, Table1[TranscUSD], 0 )

Regards
Zubair

Please try my custom visuals

yes both are columns 

 

For example, fraud score has values 0 and 1 

 & 

transaction amount has values in USD 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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