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 IDvolume(orders)
carrier1200
carrier21
carrier320
carrier413
carrier51

 

the # from this example would be 2 carriers shipped one time.

 

I'm a little new to power Bi so bear with me. 

 

This is what I did but it just counted all the carriers:

 

One & Done = CALCULATE(DISTINCTCOUNT(McLeodIQ_Operations[Carrier.Carrier ID]),FILTER(McLeodIQ_Operations,McLeodIQ_Operations[Orders]=1))
  • 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!

     

     

     

12 Replies

  • you get points for the cool table name, and points deducted for the ampersand.

     

    One n Done = countrows(filter(McLeodIQ_Operations,[Orders]=1))
    • mkane12's avatar
      mkane12
      Helper I

      thanks, but unfortunately this did not work. 

      • lbendlin's avatar
        lbendlin
        Super User

        Please provide a more detailed explanation. What have you tried and where are you stuck?

        I tested the measure on my side and it seemed to work.

  • DAXian's avatar
    DAXian
    Frequent Visitor

    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!

     

     

     

    • v-aatheeque's avatar
      v-aatheeque
      Community Support

      Hi mkane12 ,

      If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.

      If you have any further questions, feel free to reach out.
      Thank you for being a valued member of the Microsoft Fabric Community Forum!