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! It's time to submit your entry. Live now!
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! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 43 | |
| 31 | |
| 27 | |
| 23 |
| User | Count |
|---|---|
| 134 | |
| 114 | |
| 58 | |
| 39 | |
| 35 |