Forum Discussion
Customer Frequency Bins - DAX
Hi all,
I am trying to visualize frequency bins of customers visits (eg - number of customers who visited between 2-5 times, 6-10 times, 10+ times etc) in a given period (based on date slicer). I have a Table1 with customer_Id, date(eg - 11/12/2018) and order_id. So customer_id is repeated in rows based on number of times a customer visited. Now I used calcualted table to get the results.
Cust-Freq-Table = summarize('Table1','Table1'[Customer_Id],
"Customer-Freq",COUNT('Table1'[Customer_Id]))
But the problem is it is not filtering by date slicer. What can I do ? Please suggest.
Thanks!
Anonymous solution attached, you can tweak it as per your needs.
Anonymous and also make sure the sort order on visual is by bin, you can check that by clicking three dots on top right corner of the visual.
16 Replies
- parry2k
Super User
Anonymous hey if you share some sample data in excel using onedrive/google drive and can get you the solution.
- AnonymousNot applicable
parry2k Here is the link to the excel file https://drive.google.com/open?id=1TvR_S4du3o7eYxGxfe9_qM55uQjr73K2
I have only "raw" sheet with me. I need to get to the graph in "bin" sheet when the date slicer is 11/12/2018 to 12/11/2018 (when I change the dates I expect graph to change but that is not happening prperly with my current dax). Also I want bin sizes in order in the x-axis like [1-2] then [3-5] and then [6-10].
I hope that helps.
Thanks!
- parry2k
Super User
Anonymous link is not reachable, can you reshare it?
- AnonymousNot applicable
parry2k Works perfectly! Thanks for quick reply. I missed the trick of sorting in the visual by 3 dots.