Forum Discussion
thomazinh
Helper I
4 years agoExclusion List in DAX
I am trying to create a calculation to exlclude a list of characters from the summed calculation within a text string. The example below is a very short list to the thousands of rows I am actually tr...
- 4 years ago
ExlusionOfStrings = CALCULATE(SUMX(FILTER('Exlusion', NOT (CONTAINSSTRING(Exlusion[String],".NF") || CONTAINSSTRING(Exlusion[String],".MT"))), 'Exlusion'[Value]))
thomazinh
Helper I
4 years agovojtechsima Gotcha - thank you.
What about for a text string containing the exclusion string? I can get it to work for just the .NF or .MT but if the string is longer, like 0000.01.NF then I can't. I don't have access in the dataset to just isolate the .NF, .MT, .OHEAD, etc. like I'm needing to for this solution.
vojtechsima
Super User
4 years agoExlusionOfStrings =
CALCULATE(SUMX(FILTER('Exlusion', NOT (CONTAINSSTRING(Exlusion[String],".NF") || CONTAINSSTRING(Exlusion[String],".MT"))), 'Exlusion'[Value]))