Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Kathir
Frequent Visitor

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

Screenshot 2024-08-06 231912.png

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@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)
 
12.PNG
 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@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)
 
12.PNG
 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




NaveenGandhi
Super User
Super User

Hi @Kathir 

Your question is a bit unclear, If you want a calculated column to only have unque values from the column you specified use below dax to create a table.

Unieuq = values(columnname)

If this is not what you are looking for, Please provide sample screenshot for sample output.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors