Forum Discussion
Blizzard
8 years agoRegular Visitor
Count duplicates only once in a column
Hi all, I want to identify in a column (not as a measure) all values for a specific ID only once. ID Date Unique 10 09.11.2017 YES 2 01.12.2017 YES 10 11.11.2011 NO ...
- 8 years ago
Hi Blizzard
Please try this column
Column = VAR IDCount = CALCULATE ( COUNTROWS ( Table1 ), ALLEXCEPT ( Table1, Table1[ID] ) ) = 1 VAR Last_Date = Table1[Date] = CALCULATE ( MAX ( Table1[Date] ), ALLEXCEPT ( Table1, Table1[ID] ) ) RETURN IF ( OR ( IDCount, Last_Date ), "Yes", "No" )
Zubair_Muhammad
Community Champion
8 years agoHi Blizzard
Please try this column
Column =
VAR IDCount =
CALCULATE ( COUNTROWS ( Table1 ), ALLEXCEPT ( Table1, Table1[ID] ) ) = 1
VAR Last_Date =
Table1[Date]
= CALCULATE ( MAX ( Table1[Date] ), ALLEXCEPT ( Table1, Table1[ID] ) )
RETURN
IF ( OR ( IDCount, Last_Date ), "Yes", "No" )Blizzard
8 years agoRegular Visitor
Hi Zubair_Muhammad,
your code is working as well. For the first step I used the code presented here.
Unfortunately I double posted my question :(. But as your formular is working as well, I`m confident that I can use it for the next step in another calcualtion.
Thanks a lot,
Michael