Forum Discussion

MSAYED26's avatar
MSAYED26
Icon for Helper II rankHelper 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

  • Thanks for the advice,

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

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

    In this example I have the count  of parts that have more than or equal 2 supplier is 5 parts and the count of parts that have one supplier is 6 parts 

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      Your sample data does not include dates.  That means we cannot comment on the requirement 

       

      I want to count how many parts with supplier more than 2 and supplier equal 1  and change with date
      • MSAYED26's avatar
        MSAYED26
        Icon for Helper II rankHelper II
        PartsPosting DateSuppliers
        W8TC1806100C05-01-2020A
        W43002256AC08-01-2020B
        W63X54HL08-01-2020B
        W4101839512-01-2020E
        W43011994S12-01-2020E
        W43016101S12-01-2020E
        W91104433S12-01-2020E
        W4300225614-01-2020B
        W43002256AC14-01-2020B