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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.