Forum Discussion
Anonymous
6 years agoNot applicable
Measure or Calculated Column adding +1 per condition met
Hi all, Per row, I want to check how many conditions the associated data meets. E.g. if I have the following table People: Name Cash Eye Color Shoe Color Hair Color John 20 Br...
- 6 years ago
Anonymous , not very clear
create a new column =if( [cash] > 50 && [eye color] = "Green",1,0) + if( [cash] <10 && [eye color] = "Brown",1,0) + if( [Shoe Color] "Yellow" && [eye color] = "Green",1,0)
+ if( [Shoe Color] "Brown" && [eye color] = "Brown",1,0)
dedelman_clng
6 years agoCommunity Champion
Hi Anonymous
You can create a measure with this general formula pattern:
Counter =
var __Check1 = COUNTROWS(
FILTER (Table, Table[Cash] > 50 && Table[Eye Color] = "Green") )
var __Check2 = COUNTROWS( FILTER (Table, **Check2 Conditions**) )
...
var __CheckN = COUNTROWS( FILTER (Table, **CheckN Conditions**) )
RETURN
__var1 + __var2 + ... + __varN + 0 //The +0 at the end keeps the result from being BLANK
Hope this helps
David