Forum Discussion
SushmaReddy
Helper I
4 years agoCount without duplicates
Hi Team,
I got a requirement where i have to get the latest material count without duplicates based based on date field.
Max Date =
Var mat= T1[Model Number]
return
MAXX(
FILTER(ALL(T1),T1[Model Number]=MAT),(T1[Processing Date]))
But the duplicate records are counting
EX:Model Number Date
F490 10-02-2021
F490 10-02-2021
F590 11-02-2021 The count has to be 2 but it is displaying 3.
Please suggest the ideas
Regards
Sushma
SushmaReddy Try with:
Misura =VAR MAXD = CALCULATE(MAX(Tabella[Date]), ALLEXCEPT(Tabella,Tabella[Model Number]))RETURN CALCULATE(DISTINCTCOUNT(Tabella[Model Number]), Tabella[Date] = MAXD, ALLEXCEPT(Tabella,Tabella[Model Number]))BF
1 Reply
- BeaBF
Super User
SushmaReddy Try with:
Misura =VAR MAXD = CALCULATE(MAX(Tabella[Date]), ALLEXCEPT(Tabella,Tabella[Model Number]))RETURN CALCULATE(DISTINCTCOUNT(Tabella[Model Number]), Tabella[Date] = MAXD, ALLEXCEPT(Tabella,Tabella[Model Number]))BF