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
Hi folks,
I have to apply simple Distinct count formula based on mutiple criteria
| Region | State | DB Code | DB Name | Channel Code | Flag | Channel |
| East | Assam | 103393 | ASHOK KUMAR JAIN & CO.(BLC-TINSUKIA) | 5200 | Prim | p>s |
| East | Bihar | 103505 | ASHOK UDYOG(BLC-FORBESGANJ) | 5200 | Prim | p>s |
| East | West Bengal | 106652 | RAMKRISHNA PAPER HOUSE (SILIGURI) | 5200 | Prim | Prim |
| East | West Bengal | 1089 | ASHIS KUMAR RUDRA(NAIHATI) | 5200 | Prim | p>s |
| East | West Bengal | 11068 | KALIMATA DIST.HOUSE(MOGRA) | 5200 | Prim | p>s |
| East | Jharkhand | 11073 | CSD Ramgarh | 5400 | Prim | p>s |
| East | West Bengal | 1118 | CSD Kolkata | 5400 | Prim | p>s |
| East | West Bengal | 1128 | DAMANI STORES-PURULIA | 5200 | sec | sec |
| East | West Bengal | 1129 | JANATA STATIONERY ST.(BLC)-RNGJ | 5200 | sec | sec |
| East | West Bengal | 1134 | SRI DURGA SALES AGENCY-BRKR | 5200 | sec | sec |
| East | West Bengal | 122977 | TARAMA AGENCY(BLC-JAGACHA) | 5200 | sec | sec |
| Result Required | ||||||
| prim=7 | ||||||
| Sec+P>s=10 |
I am very sad about Power BI behaviour. it is not allowing the flexibility as tableau. Tablea is far better than PBI
Request you guys please help me
Solved! Go to Solution.
Hi @Anonymous - you're not very clear about what you're trying to do, but here's how to get the results you are looking for:
Prim = COUNTROWS(FILTER(Table2, Table2[Flag]="PRIM"))
SecOrPgtS = COUNTROWS(FILTER(Table2, Table2[Channel] in {"P>S", "sec"}))
If that is not what you're looking for, please expand on the description of what you are trying to do.
Hope this helps
David
Hi @Anonymous - you're not very clear about what you're trying to do, but here's how to get the results you are looking for:
Prim = COUNTROWS(FILTER(Table2, Table2[Flag]="PRIM"))
SecOrPgtS = COUNTROWS(FILTER(Table2, Table2[Channel] in {"P>S", "sec"}))
If that is not what you're looking for, please expand on the description of what you are trying to do.
Hope this helps
David
Hi David,
Thanks for reply.
I have resolved this myself
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 19 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 20 | |
| 12 | |
| 10 |