Forum Discussion
Anonymous
4 years agoNot applicable
IF AND DAX Error
Hi Experts
Getting and error with my IF (AND( dax measure and cannot see what i have done wrong?
Oder Type (new) = IF(AND(NEWBI_COMPS[Order Type]="Maintenance",NEWBI_COMPS[Renewal]="True"),"Renewal",IF(AND(NEWBI_COMPS[Order Type]="Maintenance",NEWBI_COMPS[Renewal]="False"),"New",NEWBI_COMPS[Order Type]))
Hi Anonymous ,
Try this:-
Oder Type (new) = SWITCH ( TRUE (), AND ( NEWBI_COMPS[Order Type] = "Maintenance", NEWBI_COMPS[Renewal] = "True" ), "Renewal", AND ( NEWBI_COMPS[Order Type] = "Maintenance", NEWBI_COMPS[Renewal] = "False" ), "New", NEWBI_COMPS[Order Type] )Thanks,
Samarth
1 Reply
- Samarth_18Community Champion
Hi Anonymous ,
Try this:-
Oder Type (new) = SWITCH ( TRUE (), AND ( NEWBI_COMPS[Order Type] = "Maintenance", NEWBI_COMPS[Renewal] = "True" ), "Renewal", AND ( NEWBI_COMPS[Order Type] = "Maintenance", NEWBI_COMPS[Renewal] = "False" ), "New", NEWBI_COMPS[Order Type] )Thanks,
Samarth