Forum Discussion

Marcox28's avatar
Marcox28
Icon for Helper II rankHelper II
7 years ago
Solved

Group Customer by Sales

I have a problem to solve:
I have two tables, sales and customers
the sales table shows all the rows of each individual sale where the customer number is expressed in a field.
the other table is a customer registry that works as a lookup.

I would like to use a measure to display only customers who have purchased more than 5 products (so 5 sales lines)

how can I do?
  • Marcox28 assuming you have relationship between these two tables, try following measures

     

    More than 5 Products = 
    IF( COUNTROWS( SalesTable ) > 5, 1 )

    Drop table visual and user customer from customer table and new measure, and you will see only those customer wiht more than 5 sales lines

3 Replies

  • Marcox28 assuming you have relationship between these two tables, try following measures

     

    More than 5 Products = 
    IF( COUNTROWS( SalesTable ) > 5, 1 )

    Drop table visual and user customer from customer table and new measure, and you will see only those customer wiht more than 5 sales lines

    • Marcox28's avatar
      Marcox28
      Icon for Helper II rankHelper II

      thank you,
      could it be a solution, how can I calculate the number of distinct customers belonging to a cluster?