Forum Discussion
slhangen
2 years agoHelper II
Issue with Switch and IF statements
Code for Calculated Column is:
Ineligible =
SWITCH(
'SUSPENSIONS- SHAREPOINT (EXCEL)'[OrderedDate]>=10/2/2023,
'SUSPENSIONS- SHAREPOINT (EXCEL)'[Fighter]=TRUE(),
'SUSPENSIONS- SHAREPOINT (EXCEL)'[OFFENSE]="PHYSICAL ACTIVITY/FIGHTING")
I am getting True returned for all dates. I need True only if offense occurred on or after 10/2/23.
Thx for any assistance
3 Replies
- parry2kSuper User
- parry2kSuper User
slhangen what you are trying to achieve? How one will know what is asked here? How one will know if the DAX you posted is right or wrong if you don't explain what you are trying to achieve? Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490- slhangenHelper II
My apologies for not being clear.
I need True in the calculated column only if offense occurred on or after 10/2/23. I was able to fiure it out with DATE (2023, 10, 2). THX for your response though.