Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I'm trying to create a bar graph with the # of purchases on x axis and how many people that has done that many purchases.
For example
5
4
3
2 __
1______|_|______
1 2 3
this would mean that 1 person who have purchased 3 product.
The twist is that I need this to be in relation to which products I have selected. So if I choose 4 products I want to see how many people have 1 of those products, how many has 2 and so on..
So I'm guessing I need to create a calculated dimension that first sums up how many products each person has (from the current selection of products) and then count how many people have that many products and display it in x axis.
Any thoughts/solutions?
Hi Jonas,
please see the attached example for help (Sheet WORK).
Hope it helps to get the right idea.
Good luck!
Rainer
hei
try to bulid a graph like this
dim : =left(class(aggr(count(distinct [prod id]),[cust id]),1),1)
expr : count(distinct cust id)
hope its helps
i have an example but cant upload it
if you want it send me your e mail
EDIT:
I realized I made some smaller errors in me implementing your solution, I think that's why it isn't working.
_____________________________
Thanks, that's almost what I was looking.
Though now it's only showing 1 bar for how many people have 1 product. I need to have one bar for every number of products that a user has. So 100 people might have 1 product (which would be 1 on x axis and 100 on y) and 30 people might have 2 products.
These should then be viewed as separate bars.
Thanks for taking your time 🙂
/Jonas
Hi Jonas,
please see the attached example for help (Sheet WORK).
Hope it helps to get the right idea.
Good luck!
Rainer
Thanks RoiUser and Rainer! Exactly what I was looking for 🙂
It ended up being:
aggr(count(distinct productId),[userid])