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 Countif function in Excel that I need to replicate in PowerBI.
Excel function: Countifs(B:B,B1,C:C,"Date In Service")
A B C
2 Project A Date In Service
1 Project B Date In Service
1 Project C Date In Service
1 Project D Date In Service
2 Project A Date In Service
Essentially the excel function is counting how many "dates in service" there are per project.
Column a is the output of the formula.
I need help creating a similar DAX function.
Thank you!
Solved! Go to Solution.
why 2 for project A? We only see one Date in Service for project A.
pls see if this is what you want
Proud to be a Super User!
You can create a calculated column like that in your table
Please see, if this is what you want
Hi @cpatton10
Thanks for the reply from ryan_mayu and muhammad_786_1.
@cpatton10 , you can create a calculated column as follows
Column = CALCULATE(COUNT('Table'[B]), FILTER(ALLEXCEPT('Table', 'Table'[B]), [C] = "Date In Service"))
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cpatton10
Thanks for the reply from ryan_mayu and muhammad_786_1.
@cpatton10 , you can create a calculated column as follows
Column = CALCULATE(COUNT('Table'[B]), FILTER(ALLEXCEPT('Table', 'Table'[B]), [C] = "Date In Service"))
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
why 2 for project A? We only see one Date in Service for project A.
pls see if this is what you want
Proud to be a Super User!
You can create a calculated column like that in your table
Please see, if this is what you want
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |