Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following problem:
I have two tables: 1. Users and 2.Events. They have a common field called user_id, and I am trying to make a straight table to see all the information of the users and the events (clics) they have done.
[Users]
Name
user_id
[Events]
user_id
type_of_clic
clic_id (consecutive number)
So I want to display a chart with the fields: Name, email, and # of clics per type (clic_type1, clic_type 2, clic_type3, clic_type4).
To calculate the # of clics per type I am using these expressions:
clic_type1:
= if (type_of_clic=1,count(clic_id))
clic_type2:
= if (type_of_clic=2,count(clic_id))
clic_type3:
= if (type_of_clic=3,count(clic_id))
clic_type4:
= if (type_of_clic=4,count(clic_id))
I am only getting 1 row (one user) as a result in my table, and I should be getting 3 rows of results.
Thank you,
Juan.
You could use four expressions like
count({<type_of_clic={1}>} clic_id)
count({<type_of_clic={2}>} clic_id)
count({<type_of_clic={3}>} clic_id)
count({<type_of_clic={4}>} clic_id)
Or you could use a pivot table, add type_of_clic as a dimension and drag it to the top right so that it gets displayed horizontally. Then you only need one expression count(clic_id)
Can you post a sample file or screen shot of your chart?
You need set analysis i think.
You could use four expressions like
count({<type_of_clic={1}>} clic_id)
count({<type_of_clic={2}>} clic_id)
count({<type_of_clic={3}>} clic_id)
count({<type_of_clic={4}>} clic_id)
Or you could use a pivot table, add type_of_clic as a dimension and drag it to the top right so that it gets displayed horizontally. Then you only need one expression count(clic_id)
Hi Gysbert,
The first option worked!
Thank you for your help.
Juan.