Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Client Purchase Frequency

Hi dear community, I have a problem here and would love your help. I have two tables. A customer table and a sales table. Ex Customer: Clinet ID Creation Date 1 01/01/2021 2 01/02...
  • amitchandak's avatar
    4 years ago

    Anonymous , Create measures like

     

    Total sales = Count(Sales[Sales ID])

     

    No purchase = countx(values(Customer[client ID]) , if(isblank([Total Sales]),[client ID],blank()))

     

    1 purchase = countx(values(Customer[client ID]) , if([Total Sales]=1,[client ID],blank()))

     

    2 or more purchase = countx(values(Customer[client ID]) , if([Total Sales]>=2,[client ID],blank()))