Forum Discussion
jthomson
Solution Sage
9 years agoCount instances of string in multiple columns
Hi, Been searching the forums but can't find anything that exactly replicates what I'm trying to do - I currently have an Excel file that has the following column names (along with various others...
- 9 years ago
Hi try with this:
CountinAllHirerColumns = CALCULATE ( COUNTROWS ( Table1 ), USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 1] ) ) + CALCULATE ( COUNTROWS ( Table1 ), USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 2] ) ) + CALCULATE ( COUNTROWS ( Table1 ), USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 3] ) )After that in your visual filter:
Regards
Victor
Lima - Peru
Vvelarde
Community Champion
9 years ago
Hi try with this:
CountinAllHirerColumns =
CALCULATE (
COUNTROWS ( Table1 ),
USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 1] )
)
+ CALCULATE (
COUNTROWS ( Table1 ),
USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 2] )
)
+ CALCULATE (
COUNTROWS ( Table1 ),
USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 3] )
)After that in your visual filter:
Regards
Victor
Lima - Peru