Forum Discussion

UntamanEi's avatar
UntamanEi
Frequent Visitor
5 years ago
Solved

Filter and Sum Repurchase each customer

Hello,

This is my sample data.

My question, I would like to sum total and filter who repurchase greater than 2 times. But I have some problem following below,

Best Regards,

  • stevedep's avatar
    stevedep
    5 years ago

    Hi,

    Like this?

    Please note the visual level filter and the creation of a parameter:

    Code:

    __Check = SUMX(VALUES('Table'[Cust]), if ( CALCULATE(COUNT('Table'[product]), ALLEXCEPT('Table','Table'[Cust]))
    > Parameter[Parameter Value], 1,0)
    )

    Link to file

    Please mark as solution if so. Thumbs up for the effort are appreciated.

    Kind regards, 
    Steve. 

3 Replies

  • Hi,

    Based on that data that you have shared, please show the exact result that you are expecting.  Also, share data in a format that can be pasted in MS Excel.

    • UntamanEi's avatar
      UntamanEi
      Frequent Visitor

      I appreciate your reply Ashish_Mathur .

      This is my expected result. I would like to overview when each customer purchases.

      when I would like to filter who purchases greater than 2 times.

      This is my sample data.

      DateCustproduct
      1/1/2020AC001
      1/13/2020BC002
      1/22/2020CC003
      1/24/2020DC004
      1/30/2020EC005
      2/2/2020FC001
      2/4/2020GC003
      2/19/2020AC001
      2/25/2020BC003
      2/27/2020CC004
      3/5/2020GC001
      3/11/2020DC003
      3/17/2020EC004
      3/19/2020AC005
      3/25/2020EC001
      4/4/2020FC002
      4/7/2020BC003
      4/12/2020CC004
      4/15/2020DC005
      4/30/2020IC001

       

      Best Regards,

       
      • stevedep's avatar
        stevedep
        Icon for Memorable Member rankMemorable Member

        Hi,

        Like this?

        Please note the visual level filter and the creation of a parameter:

        Code:

        __Check = SUMX(VALUES('Table'[Cust]), if ( CALCULATE(COUNT('Table'[product]), ALLEXCEPT('Table','Table'[Cust]))
        > Parameter[Parameter Value], 1,0)
        )

        Link to file

        Please mark as solution if so. Thumbs up for the effort are appreciated.

        Kind regards, 
        Steve.