Forum Discussion
Identify duplicates and show up records
- Anonymous9 years ago
You could create a calculated column with the following formula:
Count Emails = Var Emails = [Emails] RETURN CALCULATE( COUNTROWS('Your Table'), all('Your Table'), 'Your Table'[Emails] = Emails )From here, you could simply look for any rows where the Count Emails is greater than 1.
You could create a calculated column with the following formula:
Count Emails =
Var Emails = [Emails]
RETURN
CALCULATE(
COUNTROWS('Your Table'),
all('Your Table'),
'Your Table'[Emails] = Emails
)From here, you could simply look for any rows where the Count Emails is greater than 1.
Im not sure if this is better, wors or the same but in later versions of Power Bi you can use "Earlier" to refere to "in same line" values... hence i used it like this:
- Anonymous6 years agoNot applicable
Well look at that, this thread has been open for 2 years and the day I come to post my solution someone has beaten me by 4 days! The EARLIER() solution is cleaner but should be the same complexity as declaring a variable. Essentially, creating a variable outside of the calculate function is one way to pass row context into the calculate, and using the EARLIER function in the filter is the cleaner way of doing the same thing.
- Anonymous6 years agoNot applicable
Declaring variables has become a habit as it works in all cases. Yes Earlier works in this instance but i've run into a number of instances where i need to pass information into a calculate because the corresponding function for whatever i'm doing isn't compatable with calculate. For ease of development i just use variables 100% of the time now.