Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Custom column with respect to distinct value

Hi,

 

I want custom column , result need to appear as (Dist Count)..

For every distinct value of column- A, first row need to appear as 1 and remaining need to display as 0.

 

VinDist count
19UUA9F29DA0262541
19UUA9F29DA0262540
19UUA9F29DA0262540
1G6AJ5SXXD01889811
1G6AJ5SXXD01889810
JA4AD2A35EZ7783361

 

Thanks,

Mohanraj.

 

Jihwan_Kim amitchandak 

  • Anonymous 

     Add an Index Column in  Power Query then add the following column using DAX in your model.

    Column = 
    INT(
        Table7[Index] = 
        MINX(
            FILTER(Table7,Table7[Vin]=EARLIER(Table7[Vin]))
            ,Table7[Index]
        )
    )

     



  • Anonymous's avatar
    Anonymous
    5 years ago

    Thanks a lot.

    Got it.

2 Replies

  • Anonymous 

     Add an Index Column in  Power Query then add the following column using DAX in your model.

    Column = 
    INT(
        Table7[Index] = 
        MINX(
            FILTER(Table7,Table7[Vin]=EARLIER(Table7[Vin]))
            ,Table7[Index]
        )
    )

     



    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks a lot.

      Got it.