Forum Discussion
Count instances of string in multiple columns
- 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
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
- YashGurudath8917 years agoRegular Visitor
Would you happen to have an idea what to do if there were 700+ Columns? In my case, I am looking for specific string in all these columns.
I can get the Results in excel by doing COUNTIF(A1:A700,"PASS") and it gives me the total count.
Please let me know if there is a solution to this. VvelardeThanks in Advance
- Ashish_Mathur7 years ago
Super User
Hi,
In your text, you state 700+ columns but in your formula you have 700 rows. Please clarify. If there are 700 columns, you may have to Unpivot columns and then it becomes an easy one to solve.
Share some data and show the expected result.
- Anonymous6 years agoNot applicable
Hi, adding to that, can this be used for dynamic number of Hirer columns in Table1?