cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper III

## measure to count dulicates

Hi

i want to count the total finished however there areID's that are duplicate. how do i count filter and only dount unique values of another?

i have a measure with the following formula:

= countx(filter(Table,Table[Status]="Finished"),Table[Status])

example:

 ID Status A12 FINISHED C67 FINISHED D54 STARTED C12 FINISHED A12 FINISHED
3 ACCEPTED SOLUTIONS
Super User

Hi @AI14

=
CALCULATE ( DISTINCTCOUNT ( Table[ID] ), Table[Status] = "Finished" )

Helper III

Thanks, worked.

what if i wanted to add 2 filters

i tried the below but didnt count, just showed blank

CALCULATE ( DISTINCTCOUNT ( Table[ID] ), Table[Status] = "Finished"  && Table[Status] = "Started" )

Super User

try replacing && with ||

4 REPLIES 4
Super User

Hi @AI14

=
CALCULATE ( DISTINCTCOUNT ( Table[ID] ), Table[Status] = "Finished" )

Helper III

Thanks, worked.

what if i wanted to add 2 filters

i tried the below but didnt count, just showed blank

CALCULATE ( DISTINCTCOUNT ( Table[ID] ), Table[Status] = "Finished"  && Table[Status] = "Started" )

Super User

try replacing && with ||

Super User

hi @AI14

try to create a measure like this:

count =
VAR _table =
VALUES(TableName[ID]),
"Status",
CALCULATE(MAX(TableName[Status]))
)
RETURN
COUNTROWS(
FILTER(_table, TableName[Status] = "Finished")
)

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors