Forum Discussion

tl5970's avatar
tl5970
Frequent Visitor
7 years ago
Solved

Measure Product Distribution

Hi all, could anyone help me to solve the below measure?

total_sales_qty for each store must greate thn 0 thn count as 1.

Each Product's distribution will calculate base on the total store's sales qty that is more thn 0

What I get is in Red column. Kindly pls help. Thanks in advance

 

 

  • Hi tl5970,

     

    Please try the measure below.

     

    Measure =
    CALCULATE (
        COUNT ( 'table'[Store_No] ),
        FILTER ( 'table', CALCULATE ( SUM ( 'table'[Total_sales_qty] ) ) > 0 )
    )
    

    Here is the result output.

     

     

    Best Regards,

    Cherry

4 Replies

  • tl5970's avatar
    tl5970
    Frequent Visitor

    Hi all, could anyone help me to solve the below measure?

    total_sales_qty for each store must greate thn 0 thn count as 1.

    Each Product's distribution will calculate base on the total store's sales qty that is more thn 0

    What I get is in Red column. Kindly pls help. Thanks in advance

     

     

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi tl5970,

     

    I'm a little confused about your scenario.

     

    If it is convenient, could you share some data sample as table and your desired output so that I can understand better and help further on it?

     

    Best  Regards,

    Cherry

    • tl5970's avatar
      tl5970
      Frequent Visitor

      Hi v-piga-msft,

       

      Thanks for your reply. The desired output is "Distribution" header in 5th column. But the incorrect data I get was in column 6th.

      • v-piga-msft's avatar
        v-piga-msft
        Resident Rockstar

        Hi tl5970,

         

        Please try the measure below.

         

        Measure =
        CALCULATE (
            COUNT ( 'table'[Store_No] ),
            FILTER ( 'table', CALCULATE ( SUM ( 'table'[Total_sales_qty] ) ) > 0 )
        )
        

        Here is the result output.

         

         

        Best Regards,

        Cherry