Forum Discussion
PBIfanatic
Helper V
4 years agoCount first occurance
Hi, I have a data requirement to count only the first occurance of an event. So if a Sales rep contacts a company, only the first contact is to be counted. Sales Rep Company Month ABC ...
PBIfanatic
Helper V
4 years agoHi thanks for your reply Kishore_Kadhir
Tried it but it didnt work, values came as 1 for each month.
ribisht17
Super User
4 years ago
Step 1 = CALCULATE(min('Table'[Date]),ALLEXCEPT('Table','Table'[Ccompany],'Table'[Sales Rep]))
Final Sol = if('Table'[Step 1]='Table'[Date],1,0)
So above is not counting when ABC contacted Company A for the second time
I have also made one video on the ALLEXCEPT concept here https://youtu.be/WCMwCj29TTU
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users