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
adoalan
Helper III
Helper III

Dax formula to replicate CASE WHEN from SQL

Hi,

 

I'm trying to replicated this CASE WHEN in Power BI and I got so far. 

 

adoalan_0-1668513229431.png

adoalan_1-1668513265670.png

 

can you help ?

Thank you 

3 REPLIES 3
adoalan
Helper III
Helper III

I got this
Missing Info = IF(ISBLANK(nfp_giftaiddeclaration[Forename]) && ISBLANK(nfp_giftaiddeclaration[Surname]) && ISBLANK(nfp_giftaiddeclaration[House]) && ISBLANK(nfp_giftaiddeclaration[House]) && CONTAINSSTRING(nfp_giftaiddeclaration[Forename],"&" ) && CONTAINSSTRING(nfp_giftaiddeclaration[Surname],"&" ),"Y", "N")
 
 
but I get this error:
adoalan_0-1668524376912.png

 

Create New Calculate column
and try below sytax
Column = IF(('Sheet1 (2)'[Name] = "A")&&('Sheet1 (2)'[Mail ID]="A@gmail.com") &&('Sheet1 (2)'[Amount]>2),"Y","N")Case When.png

Missing Info = IF(ISBLANK(nfp_giftaiddeclaration[Forename]) && ISBLANK(nfp_giftaiddeclaration[Surname]) && ISBLANK(nfp_giftaiddeclaration[House]) && ISBLANK(nfp_giftaiddeclaration[House]) && CONTAINSSTRING(nfp_giftaiddeclaration[Forename],"&" ) && CONTAINSSTRING(nfp_giftaiddeclaration[Surname],"&" ),"Y", "N")
 
I  got up to here ut still getting an error

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.