Forum Discussion

MSAYED26's avatar
MSAYED26
Helper II
3 years ago

distinct count

Hello ,

I want to count how many parts with supplier more than 2 and supplier equal 1

Part Supplier
W0030508752RA
W0030508752RB
W0030509095H-V1A
W0030509095H-V1A
W0030509095H-V1B
W41013044C
W41013621C
W41017168C
W41017173C
W41018408C
W41018445C

I have done this measure
 Count Supplier = CALCULATE(DISTINCTCOUNT('Table'[Supplier]),ALLEXCEPT('Table','Table'[Part]))
More than 2 = CALCULATE(DISTINCTCOUNT('Table'[Part]),FILTER(ALL('Table'),[Count Supplier]>=2))
Equal 1 = CALCULATE(DISTINCTCOUNT('Table'[Part]),FILTER(ALL('Table'),[Count Supplier]=1))
but the value is fixed with date . How can I make it change from date ?

 

 

6 Replies