Forum Discussion
Anonymous
6 years agoNot applicable
Classify customer based items purchased
I'd like to be able to classify, and then filter customers in a report based on what they purchased. My customer criteria is: 1. if a customer has only purchased Standard products, then they are a "...
- 6 years ago
Anonymous ,
In such a case better to make it as the column, find the attached file.
Appreciate your Kudos.
Greg_Deckler
6 years agoCommunity Champion
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Anonymous
6 years agoNot applicable
Hi Greg_Deckler , thanks for your response! Could you take a look at my modified post? I actually realized I want to create a calculated column called Customer Type (standard, classic, both, or premium). Please let me know if you know of a way to do this in Power BI.
- Greg_Deckler6 years agoCommunity Champion
Anonymous You can create a column like this:
Customer Type = VAR __Table = SUMMARIZE( FILTER( 'Table', [Customer] = EARLIER([Customer]) ), [Product Bought] ) RETURN SWITCH(TRUE(), "Premium" IN __Table,"Premium", "Standard" IN __Table && "Classic" IN __Table,"Both", "Classic" IN __Table,"Classic", "Standard" IN __Table,"Standard" )