Forum Discussion
Unique count measure
- 8 years ago
Hi rigosakh,
I reproduce your scenario and get expected result. Please follow the steps below.
1. In desktop, please create a calculated column using the formula, I assume the table name as 'Table2'.Column = RANKX ( FILTER ( Table2, Table2[PK] = EARLIER ( Table2[PK] ) && Table2[Value] = EARLIER ( Table2[Value] ) ), Table2[Time], , ASC, DENSE )
2. Create another calculted column to get Unique count based on the column above.Unique Count = IF ( Table2[Value] = BLANK (), 0, IF ( Table2[Column] = CALCULATE ( MIN ( Table2[Column] ), ALLEXCEPT ( Table2, Table2[Value] ) ), 1, 0 ) )
You will get desired result as follows.
Best Regards,
Angelia
Hi rigosakh,
I reproduce your scenario and get expected result. Please follow the steps below.
1. In desktop, please create a calculated column using the formula, I assume the table name as 'Table2'.
Column =
RANKX (
FILTER (
Table2,
Table2[PK] = EARLIER ( Table2[PK] )
&& Table2[Value] = EARLIER ( Table2[Value] )
),
Table2[Time],
,
ASC,
DENSE
)
2. Create another calculted column to get Unique count based on the column above.
Unique Count =
IF (
Table2[Value] = BLANK (),
0,
IF (
Table2[Column]
= CALCULATE ( MIN ( Table2[Column] ), ALLEXCEPT ( Table2, Table2[Value] ) ),
1,
0
)
)
You will get desired result as follows.
Best Regards,
Angelia
Hi v-huizhn-msft , this is exactly what I needed! Thank you so much, I didn't think about approaching it this way