Forum Discussion
Dax Formula Help
- 9 years ago
Can you elaborate why you think its ignoring the second half?
Investment Priority Test = IF ( 'CyberGrants Data'[Proposal Type] = "Internal Proposal -Administrators Only", IF ( 'CyberGrants Data'[Select the applicable investment priority ] = BLANK (), 'CyberGrants Data'[Corporate Focus Area], 'CyberGrants Data'[Select the applicable investment priority ] ), IF ( 'CyberGrants Data'[Proposal Type] = "Local Community Development", 'CyberGrants Data'[Investment Priority Category ], 'CyberGrants Data'[Proposal Type] ) )Seems to work fine
Make sure you are checking for the correct column values - meaning the conditions are spelled as they are in the column
"Internal Proposal " will not be found in the Proposal Type Column but "Internal Proposal" will be with no space at the end
Hi nmck86
What you need to do when nesting IF is to rather use the SWITCH DAX function.
And here is a really great blog post from Power Pivot Pro explaining how to use it.
https://powerpivotpro.com/2015/03/the-diabolical-genius-of-switch-true/
Also is this for a measure or creating a column?
Hi I am still working to understand switch statements... does anyone know why my formula below is IGNORING the 2nd half of my if statement around "Local Community Development" that is the issue I am running into now... I have an if statement that is working but there seems to be something wrong with my logic since it is diregarding the second half of the formula.
Investment Priority Test = IF('CyberGrants Data'[Proposal Type] = "Internal Proposal -Administrators Only",
IF('CyberGrants Data'[Select the applicable investment priority ] = BLANK(),
'CyberGrants Data'[Corporate Focus Area],'CyberGrants Data'[Select the applicable investment priority ]),
IF('CyberGrants Data'[Proposal Type] = "Local Community Development",
'CyberGrants Data'[Investment Priority Category ],'CyberGrants Data'[Proposal Type]))
- Sean9 years agoCommunity Champion
Can you elaborate why you think its ignoring the second half?
Investment Priority Test = IF ( 'CyberGrants Data'[Proposal Type] = "Internal Proposal -Administrators Only", IF ( 'CyberGrants Data'[Select the applicable investment priority ] = BLANK (), 'CyberGrants Data'[Corporate Focus Area], 'CyberGrants Data'[Select the applicable investment priority ] ), IF ( 'CyberGrants Data'[Proposal Type] = "Local Community Development", 'CyberGrants Data'[Investment Priority Category ], 'CyberGrants Data'[Proposal Type] ) )Seems to work fine
Make sure you are checking for the correct column values - meaning the conditions are spelled as they are in the column
"Internal Proposal " will not be found in the Proposal Type Column but "Internal Proposal" will be with no space at the end
- nmck869 years agoPost Patron
Ugh. You have to love pesky little "extra spaces" I wracked my brain on it and that was the issue and your reminder is what prompted me to verify it again :-)! Thanks so much!