Forum Discussion
Anonymous
4 years agoNot applicable
COUNTIF in DAX - DATA TABLE
Hi all, I would like to know how to do a COUNTIF on DAX, something like the example below: =COUNTIF(A:A,A2) I reached my results via MEASURE but I wanted to make it as a actual COLUMN ...
- 4 years ago
Hi,
I am not sure how your data model looks like, but please check the below picture and the attached pbix file.
It is for creating a new column.
Desired outcome CC = COUNTROWS( FILTER( Data, Data[UnicNumber] = EARLIER(Data[UnicNumber]) ) )
Anonymous
4 years agoNot applicable
This looks clean, loved it, I have never use EARLIER, I accidentaly found a solution too, but I loved the clean way you did it!
Yours:
Mine:
Thank you for helping me, I accept yours as a better solution!