Forum Discussion

mkane12's avatar
mkane12
Helper I
1 year ago
Solved

Measure Help

I am trying to create a measure counting any carrier that only shipped one order.    for example: carrier ID volume(orders) carrier1 200 carrier2 1 carrier3 20 carrier4 13 c...
  • DAXian's avatar
    1 year ago

    Hi mkane12 
    First I have assumed that volume is :

    Volume = SUM(McLeodIQ_Operations[Orders])


    I have created two solutions for you. The first one :

    One n Done = CALCULATE(DISTINCTCOUNT(McLeodIQ_Operations[Carrier.Carrier ID]),FILTER(ALLEXCEPT(McLeodIQ_Operations,McLeodIQ_Operations[Carrier.Carrier ID]),[Volume]=1))

     

    and the other one :

    Only One n Done =
    CALCULATE(
        DISTINCTCOUNT(McLeodIQ_Operations[Carrier.Carrier ID]),
        FILTER(
            SUMMARIZE(
                McLeodIQ_Operations,
                McLeodIQ_Operations[Carrier.Carrier ID],
                "TotalVolume", SUM(McLeodIQ_Operations[Orders])
            ),
            [TotalVolume] = 1
        )
    )  

     

     

    I've tried to replicate your column names btw. on the left, there is no date filter. so there will be 4 distinct count if order id is respected. and blank is returned for 'Only One n Done' since Carrier B has other others in April 2025. 

    On the right, we applied a date filter to only consider the whole month on March 2025. and so 1 was found for having a total volume = 1 for the whole month of march.

    I hope this solves your problem. let us know if this works!