Forum Discussion
kkt
6 years agoFrequent Visitor
Count Distinct where JobStatus = Max(JobStatus)
Hi, I have the following table A which stores the Job Stream and Job Status of some jobs by Country. TableA: Country Job Stream Jobs Job Start Time Status Hong Kong StreamA Job1 ...
dedelman_clng
6 years agoCommunity Champion
Hi kkt -
Based on your description, you can do these two measures
Current Status =
CALCULATE (
MAX ( TableA[Status ] ),
ALLEXCEPT ( TableA, TableA[Country], TableA[Job Stream] )
)
CountryCount =
VAR __myStatus =
SELECTEDVALUE ( TableA[Status] )
RETURN
CALCULATE (
DISTINCTCOUNT ( TableA[Country] ),
FILTER ( TableA, [Current Status] = __myStatus )
)
Hope this helps
David