Forum Discussion

ljimenezvega84's avatar
4 years ago
Solved

Create a count of orders

Hi! hope you all are fine

I need to create a calculation who count the homes reached. In this case, i have 47 reached homes. I´ve try to resolved with count and distintcount formula and no one helps. 

 

  • v-zhangti's avatar
    v-zhangti
    4 years ago

    Hi, ljimenezvega84 

     

    You can try the following methods.

    Measure =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Calle] ),
        FILTER ( ALL ( 'Table' ), [Venta Total] > 0 )
    )
    

    Is this the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Hi ljimenezvega84 ,

     

    How can you determine when a homne has been reached? Do you perhaps have a small sample with expected output that you can share?

  • Hi hnguy71,thanks for your response.

     

    Im counting the reached homes with the total sales; if an adress_id have a sale, this is a reached home. But if i used count in the sales column the software give me the total sales (a home can have various sales).

     

    Thanks

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

      Hi,

      Assuming Venta Total is a measure that you have written, drag this measure to a card visual

      Measure = counrows(filter(values(Data[Calle]),[Venta Total]>0))

    • v-zhangti's avatar
      v-zhangti
      Icon for Community Support rankCommunity Support

      Hi, ljimenezvega84 

       

      You can try the following methods.

      Measure =
      CALCULATE (
          DISTINCTCOUNT ( 'Table'[Calle] ),
          FILTER ( ALL ( 'Table' ), [Venta Total] > 0 )
      )
      

      Is this the output you expect?

       

      Best Regards,

      Community Support Team _Charlotte

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.