Forum Discussion

Chanleakna123's avatar
Chanleakna123
Post Prodigy
6 years ago
Solved

Customer Count Distinct value based on slicer

HI ALL , 

our purpose is to find out how many customer purchased 1 time =Customer PUrchase and customer purchased more than 2 times Customer Repurchased ( based on the period selected ,We don't care which brand or flavor , but if they purchased we count all the Numer of Customer in Distinct Count. 

 

i have table below :

PS : Value = Purchased

i wanna find out : 
****Customer Purchased : based on the Date selected , If they have purchased >1 time = Customer Purchased ( We don't care which brand or flavor they purchased ) if they have value >0 we count them purchased ,and  Customer Purchased need to Count by distinct Customer 

Based on ex below : we have 3 customer Purchased  are 2THNOO,23 coffee,dalin grill  beacause all have value 

 

****Customer RePurchased : based on the Date selected , if they have purchased >2 Times of Date ( for ex : purchased on 15 Mar & 11 Jan & so on... ) = Customer Repurchased (We don't care which brand or flavor they purchased ) and Customer Repurchased need to Count by distinct 

Based on ex below : we have 1 customer RePurchased is 23 Coffee  

 

Everything will be calculated based on the slicer , of Date , Brand , Flavor and so on , 

Please note that All customer Count only Distinct 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Chanleakna123 ,

     

    Please modify Measure2.

    Measure 2 = SUMX(ALLEXCEPT('Table','Table'[Customer],'Table'[products]),[Measure])

    Result would be shown as below.

     

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Chanleakna123 ,

     

    Please refer to the Measures below.

    Measure = IF(SELECTEDVALUE('Table'[Date])>=MIN('CALENDAR'[Date])&&SELECTEDVALUE('Table'[Date])<=MAX('CALENDAR'[Date])&&SELECTEDVALUE('Table'[Value])>0,1,0)
    
    Customer Purchased = CALCULATE(DISTINCTCOUNT('Table'[Customer]),FILTER('Table',[Measure]>0))
    
    Measure 2 = SUMX(ALLEXCEPT('Table','Table'[Customer]),[Measure])
    
    Customer RePurchased = CALCULATE(DISTINCTCOUNT('Table'[Customer]),FILTER('Table',[Measure 2]>1))

    Result would be shown as below.


    Pbix as attached.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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

    • Chanleakna123's avatar
      Chanleakna123
      Post Prodigy

      hi Anonymous  , 

      i have done over this , Purchased is correct.

      But Re-Purchased is not , because below Customer i highlight bought the different products at the same date on 18 Jan , which is sum to 5.58 , While these numers are sum up 2 times together , in term of Re-Purchased , We Don't count this customer into Re-Purchased. he just bought 2 times at the same date , so we don't count it. 

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Chanleakna123 ,

         

        Please modify Measure2.

        Measure 2 = SUMX(ALLEXCEPT('Table','Table'[Customer],'Table'[products]),[Measure])

        Result would be shown as below.

         

         

        Best Regards,

        Jay

        Community Support Team _ Jay Wang

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