Forum Discussion
jmiridium
Helper IV
9 years agoCALCULATE and FILTER With Text
How do I add a column using CALCULATE and FILTER with text results? Urgent
- Anonymous9 years ago
Failed = CALCULATE( COUNT(ComputerStatus[Acrobat]), LEFT(ComputerStatus[Acrobat], 6) = "FAILED") )Try this.
Anonymous
9 years agoNot applicable
Is failed always going to be the first 6 characters? If so, use LEFT([YourField], 6) = "FAILED". Failing that there is a function called FIND which returns true or false if it finds a subtext within a larger text.
For performance reasons, LEFT is going to be faster but if its not suitable FIND will work in a similar manner to the wildcarding you were hoping for.
jmiridium
Helper IV
9 years agoYes. It's actually Failed then various resons
- Anonymous9 years agoNot applicable
Then i think LEFT([YourField], 6) = "FAILED" will work for you.
- jmiridium9 years ago
Helper IV
Would this be the correct complete syntax?
Failed =
CALCULATE(
COUNT(ComputerStatus[Acrobat]),
FILTER(ComputerStatus, ComputerStatus[Acrobat] = LEFT([YourField], 6) = "FAILED"))- Anonymous9 years agoNot applicable
Failed = CALCULATE( COUNT(ComputerStatus[Acrobat]), LEFT(ComputerStatus[Acrobat], 6) = "FAILED") )Try this.