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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
dhaindra
Regular Visitor

give the value of the same data value (DAX)

hi,

someone who can help me ?

 

unfortunately I want to add a column whose contents have values ​​from row duplicate, for example :

 

dhaindra_0-1662354150027.png

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dhaindra 

Please try this DAX formula .

New column = 
var _a=CALCULATE(COUNT('Table'[facno]),FILTER('Table','Table'[custno]=EARLIER('Table'[custno]) && 'Table'[facno]>EARLIER('Table'[facno]))) 
return
if(_a<>BLANK(),1,0)

Ailsamsft_0-1662432028856.png

I have attached my pbix file , you can refer to it .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @dhaindra 

Please try this DAX formula .

New column = 
var _a=CALCULATE(COUNT('Table'[facno]),FILTER('Table','Table'[custno]=EARLIER('Table'[custno]) && 'Table'[facno]>EARLIER('Table'[facno]))) 
return
if(_a<>BLANK(),1,0)

Ailsamsft_0-1662432028856.png

I have attached my pbix file , you can refer to it .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@dhaindra , A new column

 

New column =

var _next = countx(filter(Table, [Custno] = earlier([Custno]) && [Factno] >earlier([Factno]) ) , [Fact No])

return

if(not(isblank(_next)) ,1,0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

hi @amitchandak thx before, but i try this code, the result its error.

 

can you give me back simple code if duplicate from custno only ? no include facno. 

 

thx 🙏

@dhaindra , Can you share the error. Also data in table format

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @dhaindra 
Is factno a measure? 

When the customer is repeated, for example custno 123 is repeated twice. Which one is the first, which one is last? Do you have a date column or index?

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.