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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.