Forum Discussion
adoalan
3 years agoHelper III
Case when in Power BI
I have this SQL code and I need to convert this in a dax in Power BI Can I get some help: Thank you
- 3 years ago
adoalan you're missing two brackets "))" after "...Street1])" and after "...PostalCode])"
- 3 years ago
adoalan
You are missing the brackets :-Can you just try this :-
Valldata Fix = IF(nfp_giftaiddeclaration[cratedbyyominame] = "Valldata" && ISBLANK(nfp_giftaiddeclaration[House])
&& ISBLANK(nfp_giftaiddeclaration[Postcode]) && NOT(ISBLANK(RELATED(contact[Address 1: Street 1]))) && NOT(ISBLANK(RELATED(contact[Address 3: ZIP/Postal Code]))), "Y", "N")
JorgePinho
3 years agoSolution Sage
Hello adoalan !
Create a dax column using this:
Valldata Fix = IF( gad.createdbyname = "Valldata" && ISBLANK(gad.nfp_declaredhouse) && ISBLANK(gad.nfp_declaredpostcode) && NOT(ISBLANK(c.adress1_line1)) && NOT(ISBLANK(c.adress1_postalcode)), "Y", "N")
- adoalan3 years agoHelper III
JorgePinho this works half for me. So the c.address1_line1 is coming from a different table called contact and it is not popping up when search. Can you help here?
- JorgePinho3 years agoSolution Sage
Are the tables connected?
- adoalan3 years agoHelper III
Yes,
Thank you