Forum Discussion
CountRows with condition
Hi guys, i'm starting my project on PBI but I stopped by a problem.
I have a sheet with the data from NPS Evaluation form.
I want count how many evaluations was answered. i know the result is 5000, but can't calculate with dax formula.
I have the Data Resposta column and the ID Cliente. For each response in evaluation i have a row, that's Atributo CSAT.
I know this client answered 6 evaluations forms looking at the date, but can't calculate this for all customers, i have 981 ID Clientes diferents. It's possible count the rows filtering? each ID Cliente at same date is a 1 answer, and sum all rows with this filter
Hi Misael_Guedes ,
Please try:
Count Number = CALCULATE(DISTINCTCOUNT('Table'[Date]),FILTER('Table',[ID Cilente]=EARLIER([ID Cilente])))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- parry2kSuper User
Misael_Guedes what is the condition to include or exclude?
- v-jianboli-msftCommunity Support
Hi Misael_Guedes ,
Please try:
Count Number = CALCULATE(DISTINCTCOUNT('Table'[Date]),FILTER('Table',[ID Cilente]=EARLIER([ID Cilente])))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.