Forum Discussion
scoutmedic
2 years agoHelper I
Counting rows with multiple conditions
Hi all, I have a table with 2 columns: area and error and need to count rows where area = floor and errors are apple, orange, grapes, and watermelon. I tried using the following which worked wel...
- 2 years ago
Hi scoutmedic
You say you have 1 table but your measure refers to 2 : Error Table and Combined Error Data
You are also referring to 3 different columns but you said you have 2 : [Area], [Category] and [Category Detail]
If you are using 1 table with 2 columns like like this
then this measure will do what you want
Errors = CALCULATE(COUNTROWS('Combined Error Data'), FILTER('Combined Error Data', CONTAINSSTRING('Combined Error Data'[Category], "Floor") && (CONTAINSSTRING('Combined Error Data'[Category Detail], "apple") || CONTAINSSTRING('Combined Error Data'[Category Detail], "orange") || CONTAINSSTRING('Combined Error Data'[Category Detail], "grapes") || CONTAINSSTRING('Combined Error Data'[Category Detail], "watermelon"))))regards
Phil
Ashish_Mathur
2 years agoSuper User
Hi,
Share some data to work with and show the expected result.