Forum Discussion
Anonymous
6 years agoNot applicable
DAX Switch / IF
Hi, Could I please double check if this is the right syntax to use, or should it be a switch statement? test = IF( DATEDIFF(DATEADD(vw1[DateUpdated],-1, MONTH), vw1[CreatedDate], MONTH)...
- 6 years ago
Yeah, that syntax is fine, you don't have nested IF statements and not sure a SWITCH statement would make things much cleaner. Whether or not the code works, would need to see sample data to test.
Pragati11
Super User
6 years agoHi Anonymous ,
The syntax looks right. Can you share if it is not working?
Thanks,
Pragati