Forum Discussion
mdbuzzer
5 years agoHelper I
Why is my nested IF statement not working?
I am creating a Measure using dax to create a dynamic title, so if the DM has been filtered it should adjust the title to specify "Current Year vs Previous Year for DM", but I have also added anothe...
- Anonymous5 years ago
Hello mdbuzzer ,
Please try with below DAX
Measure = IF(ISFILTERED(District[DM])&&ISFILTERED(Store[Name]),"Current Year vs Previous Year for "&SELECTEDVALUE(District[DM])&" for "&SELECTEDVALUE(Store[Name]),IF(ISFILTERED(District[DM]),"Current Year vs Previous Year for "&SELECTEDVALUE(District[DM]),"Current Year vs Previous Year"))
Anonymous
5 years agoNot applicable
Hello mdbuzzer ,
Please try with below DAX
Measure = IF(ISFILTERED(District[DM])&&ISFILTERED(Store[Name]),"Current Year vs Previous Year for "&SELECTEDVALUE(District[DM])&" for "&SELECTEDVALUE(Store[Name]),IF(ISFILTERED(District[DM]),"Current Year vs Previous Year for "&SELECTEDVALUE(District[DM]),"Current Year vs Previous Year"))
mdbuzzer
5 years agoHelper I
Ahh very simple - I should have just used && rather than the AND function