Forum Discussion
e77948
4 years agoRegular Visitor
How do I write an IF then formula
I have a table and I need to show the data depending upon one column, I am trying to write a measure that will show the number of work items if that colu
- 4 years ago
Ah, ok, my bad. Text functions don't skip blanks.
Try this one:
if [Tags] = null then "Primary" else if Text.Contains([Tags], "Secondary") then "Secondary" else "Primary"Pete
e77948
4 years agoRegular Visitor
I want the custom column to say "Primary" if the column "Tags", does not contain the word "Secondary", or if the "Tags" column is blank, and I want the new column to say "Secondary" if the "Tags" column, contains the word "Secondary".
BA_Pete
4 years agoSuper User
Cool. Try this in a new custom column:
if Text.Contains([Tags], "Secondary") then "Secondary" else "Primary"
Based on your requirement, we don't need to specify anyhting for a blank [Tags] value, as we just pass anything that doesn't contain "Secondary" as a "Primary" output.
Pete
- e779484 years agoRegular Visitor
I get errors for the 25 rows that are blank when I use that query,
- BA_Pete4 years agoSuper User
Ah, ok, my bad. Text functions don't skip blanks.
Try this one:
if [Tags] = null then "Primary" else if Text.Contains([Tags], "Secondary") then "Secondary" else "Primary"Pete