Forum Discussion

Kathir's avatar
Kathir
Frequent Visitor
2 years ago
Solved

unique calculated column

Hi,    What is the caculated DAX to achieve 1, 0 from the table below.?   It shld be used in data view calculated column and not a measure in a report   Thanks
  • ryan_mayu's avatar
    2 years ago

    Kathir 

    you can try to create an index column in PQ

     

    then use DAX to create a column

     

    Column =
    VAR _count=countx(FILTER('Table','Table'[Index]<=EARLIER('Table'[Index])&&'Table'[Column1]=EARLIER('Table'[Column1])),'Table'[Column1])
    return if (_count=1,1,0)