Forum Discussion
TomGee
7 years agoNew Member
Tableau Calculated Field to DAX/Power BI Calculated Col
I'm trying to convert a tableau solution to Power BI and am ready to slam my computer against a wall. It seems that everything is harder than it needs to be. I simply want to produce an "A" or "B" r...
- 7 years ago
Hi TomGee ,
I'm assuming you are making a calculated column, try the following code:
Column = SWITCH ( TRUE (), Table[Employed] = 'F' && Table[Current Status] IN { 'A', 'B', 'C', 'D', 'E' }, "Bad", Table[Employed] = 'T' && Table[Current Status] IN { 'G', 'H', 'I', 'J' }, "Bad", Table[Current Status] = 'E' && Table[Naics] <> '92', "Bad", "GOOD" )Regards,
MFelix
MFelix
7 years agoSuper User
Hi TomGee ,
I'm assuming you are making a calculated column, try the following code:
Column =
SWITCH (
TRUE (),
Table[Employed] = 'F'
&& Table[Current Status] IN { 'A', 'B', 'C', 'D', 'E' }, "Bad",
Table[Employed] = 'T'
&& Table[Current Status] IN { 'G', 'H', 'I', 'J' }, "Bad",
Table[Current Status] = 'E'
&& Table[Naics] <> '92', "Bad",
"GOOD"
)
Regards,
MFelix
TomGee
7 years agoNew Member
Thanks so much!