Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a table with multiple columns. I need to count Column A, but only if it contains "TW/" or "TCH/". But it should only count if Column B contains the word "long". I managed to count the values with:
Solved! Go to Solution.
@Anonymous , You can add like
X = calculate(COUNTROWS(Table),SEARCH("TW/",Table[A],,0) , [column B]= "long") + calculate(COUNTROWS(Table),SEARCH("TCH/",Table[A],,0) , [column B]= "long")
or try like
X = calculate(COUNTROWS(Table),filter( (SEARCH("TW/",Table[A],,0) >0 || SEARCH("TCH/",Table[A],,0) >0 )&& [column B]= "long"))
@Anonymous , You can add like
X = calculate(COUNTROWS(Table),SEARCH("TW/",Table[A],,0) , [column B]= "long") + calculate(COUNTROWS(Table),SEARCH("TCH/",Table[A],,0) , [column B]= "long")
or try like
X = calculate(COUNTROWS(Table),filter( (SEARCH("TW/",Table[A],,0) >0 || SEARCH("TCH/",Table[A],,0) >0 )&& [column B]= "long"))
Both formulas can not add column B
oh my fault, it works perfect! BIG THANKS ❤️
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |