Forum Discussion
Match values in a column with itself
Anonymous in DAX, no need to duplicate the table, just add a calculated column in the original one. the code might be
=COUNTROWS(FILTER(Table,Table[Filed1]=EARLIER(Table[Filed1])&&Table[Filed2]=EARLIER(Table[Filed2])&&Table[Filed1]=EARLIER(Table[Filed2])))
Hi Daniel,
The formula will count the no of rows. I want to add a condition that when all the 3 fields macthed are matched then it will update the column to yes otherwise no.
- wdx223_Daniel5 years ago
Community Champion
Anonymous confused why this code did not work.
=IF(COUNTROWS(FILTER(Table,Table[Filed1]=EARLIER(Table[Filed1])&&Table[Filed2]=EARLIER(Table[Filed2])&&Table[Filed3]=EARLIER(Table[Filed3]))),"Yes","No")
could you show the snapshot?
- Anonymous5 years agoNot applicable
wdx223_Daniel Apologies, couldn't reply earlier as I was away. I tried using the above code but it is taking too much time and power bi runs out of memory as I have 3 millions rows. Is there any other way around to solve this?
- Anonymous5 years agoNot applicable
Anonymous
Sure there is. Use Power Query.