The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to understand customer behavior.
I have given an example below.
I want to know how many customers first shopped with a 20% off coupon and returned to shop with 10%off or 5%off.
Answer:
1 customer returned to the shop with 10%off (customer id: ABC)
1 customer returned to the shop with 5%off (customer id: BCD)
Customer ID | Order id | Amount | Coupon |
ABC | 1 | 20 | 20%off |
BCD | 2 | 12 | 20%off |
EFG | 3 | 12 | 20%off |
ABC | 4 | 10 | 10%off |
BCD | 5 | 35 | 5%off |
Also, which visual would be best and easy to understand.
Solved! Go to Solution.
Hi,
I think bar chart is ideal in this scenarios because it's easy to compare different categories (in this case, the types of discount coupons) by visually representing the data with bars of varying lengths. Secondly, the visual separation of bars helps in quickly identifying which coupon type had more returning customers. Lastly, the differences in bar lengths immediately highlight the variations in the number of customers for each coupon type.
Proud to be a Super User! | |
Hi Kaviraj11 ,thanks for the quick reply, I'll add more.
Hi @Jidnyasa2904 ,
The Table data is shown below:
Use the following DAX expression to create measures
Total_returning_customers =
VAR _table = SUMMARIZE('Table',[Customer ID ],"Returning Customers",COUNTROWS('Table'))
RETURN COUNTROWS(FILTER(_table,[Returning Customers] >= 2 ))
which_coupon =
VAR _coupon = SELECTEDVALUE('Table'[Coupon])
RETURN COUNTROWS(FILTER('Table','Table'[Coupon] <> "20%off" && 'Table'[Coupon] = _coupon))
Final output
Best Regards,
Wenbin Zhou
Hi,
Shouldn't there be a Date column there as well?
Hi Kaviraj11 ,thanks for the quick reply, I'll add more.
Hi @Jidnyasa2904 ,
The Table data is shown below:
Use the following DAX expression to create measures
Total_returning_customers =
VAR _table = SUMMARIZE('Table',[Customer ID ],"Returning Customers",COUNTROWS('Table'))
RETURN COUNTROWS(FILTER(_table,[Returning Customers] >= 2 ))
which_coupon =
VAR _coupon = SELECTEDVALUE('Table'[Coupon])
RETURN COUNTROWS(FILTER('Table','Table'[Coupon] <> "20%off" && 'Table'[Coupon] = _coupon))
Final output
Best Regards,
Wenbin Zhou
Hi,
Can you also help me with the occurrence calculation?
I want to know, how customers buy and their patterns.
@Kaviraj11
Hi,
I think bar chart is ideal in this scenarios because it's easy to compare different categories (in this case, the types of discount coupons) by visually representing the data with bars of varying lengths. Secondly, the visual separation of bars helps in quickly identifying which coupon type had more returning customers. Lastly, the differences in bar lengths immediately highlight the variations in the number of customers for each coupon type.
Proud to be a Super User! | |
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
51 | |
51 | |
46 |