Forum Discussion
tangutoori
Helper III
2 years agoFilter the repeated ID which match both columns
Hello,
CURRENT OUTPUT Is a table view,
Var is a measure.
ID is a column.
If is ID is repeated then compare the Old column New column, if both are matching then hide that record.
| CURRENT | EXPECTED | |||||||
| ID | Old | New | var | ID | New | var | ||
| APPLE|INDIA|AA15064 | AA15064 | AA15064 | 200 | APPLE|INDIA|AA15064 | AA15064 | AA15065 | 200 | |
| APPLE|INDIA|AA15064 | AA15064 | AA15065 | 200 | APPLE|INDIA|A15066 | A15066 | A15066 | 300 | |
| APPLE|INDIA|A15066 | A15066 | A15066 | 300 | APPLE|INDIA|A15067 | A15067 | A15067 | 400 | |
| APPLE|INDIA|A15067 | A15067 | A15067 | 400 | APPLE|INDIA|A15068 | A15068 | A15068 | 500 | |
| APPLE|INDIA|A15068 | A15068 | A15068 | 500 | APPLE|INDIA|A15069 | A15069 | A15069 | 600 | |
| APPLE|INDIA|A15069 | A15069 | A15069 | 600 | APPLE|INDIA|A1510 | A1510 | A1510 | 300 | |
| APPLE|INDIA|A1510 | A1510 | A1510 | 300 |
please do needful.
Regards,
Reddy.
2 Replies
- ryan_mayu
Super User
could you pls provide the sample data?
- AnonymousNot applicable
Hi tangutoori
You can create a measure as follows.
HideRows = VAR _countID = CALCULATE ( COUNT ( 'Table'[ID] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) ) RETURN IF ( _countID > 1 && SELECTEDVALUE ( 'Table'[Old] ) = SELECTEDVALUE ( 'Table'[New] ), 0, 1 )Then put the measure into the filter so that the visual only shows data where the measure is equal to 1.
Is this the result you expect?
Best Regards,Community Support Team_YuliaxIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.