The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
hi,
someone who can help me ?
unfortunately I want to add a column whose contents have values from row duplicate, for example :
Solved! Go to Solution.
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)
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.
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)
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.
@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)
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 🙏
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?
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |