Forum Discussion
alejandroezp
Helper I
1 year agoUsing negation condition in switch function
Good morning, I am trying to use a negative condition in a switch function. My idea is to assign a label to all the rows where appears a string. I am using something like this example: NOT(CONT...
- 1 year ago
Hi alejandroezp
You can try CONTAINSSTRING( ) that returns TRUE/FALSE directly in your SWITCH function.
SWITCH( TRUE(), CONTAINSSTRING('Facturas'[Comentario], "gratis"), "Free", CONTAINSSTRING('Facturas'[Comentario], "oferta"), "Discount", -- Add more as needed TRUE, "Other" )
v-saisrao-msft
Community Support
1 year agoHi alejandroezp,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thak you.
- alejandroezp1 year ago
Helper I
Good morning,
Sorry for delay, i was testing the solutions. At the end, the solution added by MasonMA worked and it has solved my problem.
Thank you for the support
Cheers