Forum Discussion
Trying to transform an excel formula into Dax :)
Hello,
Im trying to transform my Excel formula into DAX but obviously it doesn't work.
Can someon help me in transforming this formula into DAX ??
Status Civiel = IF(Activiteit="Civiel";IF(taken[Gesloten)<>"";"Gesloten";IF(and(taken[Open]<>"";taken[gesloten]="";"Lopend";IF(taken[begin]<>"";"Gepland";"Nog niet gepland")))))
Which fields/columns are flagged as Date? For example, if "taken[Begin]" is a Date field, then you can't do a comparison to a text value of "", You would have to use "taken[Begin] <> BLANK()" instead.
7 Replies
- Greg_Deckler
Community Champion
Tough to sort through this, but I think you might want something like:
Status Civiel = IF(Activiteit="Civiel"; IF(taken[Gesloten)<>""; "Gesloten"; IF(and(taken[Open]<>"";taken[gesloten]=""); "Lopend"; IF(taken[begin]<>""; "Gepland"; "Nog niet gepland"
)
)
)
)- RvdHeijden
Post Prodigy
Something like that :)
it a conditional colum with basically a few options depending on values in a nother column
option 1: Activity A is closed = value A
option 2: Activity A is not closed but it's being worked on = value B
option 3: Activity A is not closed and not being worked, but is planned = value C
Option 4: Activity A is not closed, not worked on, not planned = value D
In excel its the formula i posted but in Dax ????
your formula returns the following error. shouldn't this formula has a 'SWITCH' in it ?
- Greg_Deckler
Community Champion
You have an issue with data types. You are trying to compare a Date with a text ("") and you probably need to use BLANK() in place of "" in one of those comparisons.