Forum Discussion
how to create case statement with else
- 5 years ago
Hi saipawar ,
If you want to create a custom column in Power Query, try this:
- Create a conditional column.
- Or, create a custom column.
= if Text.Contains([Launch Content],"Not launch related") then "Not considered" else "Considered Content")If you want to create a calculated column in data view, try this:
Is Launch Content = IF ( CONTAINSSTRING ( [Launch Content], "Not launch related" ), "Not considered", "Considered Content" )Is Launch Content 2 = IF ( FIND ( "Not launch related", [Launch Content],, 0 ) <> 0, "Not considered", "Considered Content" )Is Launch Content 3 = IF ( SEARCH( "Not launch related", [Launch Content],, 0 ) <> 0, "Not considered", "Considered Content" )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi, try this:
Is Launch Content =
IF [Launch Content]="Not launch related"
THEN "Not considered"
ELSE "Considered Content"
// if this is a solution please mark as such. Kudos always appreciated.
- saipawar5 years agoHelper IV
This gives an error saying "Unexpected expression THEN" and "Syntax for THEN is incorrect"
Is there any other alternative to this?
- samdthompson5 years agoMemorable Member
Sorry. case sensitive
Is Launch Content =
IF [Launch Content]="Not launch related"then "Not considered"
else "Considered Content"
// if this is a solution please mark as such. Kudos always appreciated