Forum Discussion
wimsangers
5 years agoHelper I
Measure distinct count
Hi all, I am trying to formulate a measure that counts the id's that are in the status 'build_offer'. However I only want to count the id's where the status build_offer is not finished yet but t...
- 5 years ago
Hi wimsangers ,
You can create this measure:
Count = VAR tab = ADDCOLUMNS ( ALL ( 'Table' ), "_count", CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( ALL ( 'Table' ), 'Table'[process_id] = EARLIER ( 'Table'[process_id] ) ) ) ) RETURN COUNTX ( FILTER ( tab, [_count] < 2 ), [_count] )Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
v-yingjl
5 years agoCommunity Support
Hi wimsangers ,
You can create this measure:
Count =
VAR tab =
ADDCOLUMNS (
ALL ( 'Table' ),
"_count",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[process_id] = EARLIER ( 'Table'[process_id] )
)
)
)
RETURN
COUNTX ( FILTER ( tab, [_count] < 2 ), [_count] )
Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
wimsangers
5 years agoHelper I
v-yingjl Thank you for your help!