Forum Discussion
adoalan
3 years agoHelper III
Help with DAX Formula please
I have this piece of SQL code and I need to convert it in a DAX formula. I got half way through it and the below is working perfectly: TESTAGAIN = SWITCH( TRUE(), ISBLANK('nfp_g...
adoalan
3 years agoHelper III
NikhilChenna it doesn't work
NikhilChenna
3 years agoSkilled Sharer
Hi adoalan ,
Try this out then using IF condition
IF(
ISBLANK('nfp_giftaiddeclaration'[Forename]) ||
ISBLANK('nfp_giftaiddeclaration'[Forename]) ||
ISBLANK('nfp_giftaiddeclaration'[Surname]) ||
ISBLANK('nfp_giftaiddeclaration'[House]) ||
ISBLANK('nfp_giftaiddeclaration'[Postcode]) ||
CONTAINSSTRING( nfp_giftaiddeclaration[Forename] , "&" ) ||
CONTAINSSTRING(nfp_giftaiddeclaration[Surname], "&" ), "Yes",
"No")
OR
IF(
'nfp_giftaiddeclaration'[Forename]=BLANK() ||
'nfp_giftaiddeclaration'[Forename]=BLANK() ||
'nfp_giftaiddeclaration'[Surname]=BLANK() ||
'nfp_giftaiddeclaration'[House]=BLANK() ||
'nfp_giftaiddeclaration'[Postcode]=BLANK() ||
CONTAINSSTRING( nfp_giftaiddeclaration[Forename] , "&" ) ||
CONTAINSSTRING(nfp_giftaiddeclaration[Surname], "&" ), "Yes",
"No")
This should work buddy.
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- adoalan3 years agoHelper III
- NikhilChenna3 years agoSkilled Sharer
Hi adoalan ,
I think you are creating a calculated measure.
Create a calculated column.
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- adoalan3 years agoHelper III
I created coloumn and getting this
- NikhilChenna3 years agoSkilled Sharer
Hi adoalan ,
I have replicated the same with a sample table with 3 rows,
Please see you can access the attached one drive link.
I created this table -
and using this calcution -
Column =IF('Table'[Forename]=BLANK() ||'Table'[Surname]=BLANK() ||'Table'[House]=BLANK() ||'Table'[Postcode]=BLANK() ||CONTAINSSTRING('Table'[Forename],"&") ||CONTAINSSTRING('Table'[Surname],"&"),"Yes","No")You can use this formula directly you just have to replace the table name.Regards,Nikhil ChennaAppreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!