Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I have event entries:
USER_ID ACTION DATE
1 ACTION_A X
1 ACTION_B Y
1 ACTION_C Z
2 ACTION_B D
Let's assume that from filter panel I've selected from list of possible actions ACTION_B. Then count(user_id) = 2 -> I have two clients with ACTION_B. But now I want to show also how many of them have ACTION_A (counter should display value 1). How can I achieve this (without turning into single row for each USER_ID).
Thank you in advance for your help!
Regards
with pleasure
because we set the value to'Action_A'.
test this new version:
=count({$<USER_ID = p({$<ACTION=ACTION>} )>} distinct USER_ID)
Regards,
Taoufiq
Hi,
try this:
Q1 : to calculate the number of USER_IDs, if I select ACTION_B for example :
=count({<[ACTION]=ACTION>} distinct USER_ID)
Q2: to show how many of them have ACTION_A
=count({$<USER_ID = p({$<ACTION={'ACTION_A'}>} )>} distinct ACTION)
Cheers,
Taoufiq
Thank you very much for response! It helped me a lot. But I'm wondering if:
1. Formula for Q2 will work if I don't have action selected (will then show number of users with ACTION_A) ??? Without selection it returns me number that is the same as number of all rows in event table. But maybe I'm doing something wrong... - I can add IF ELSE logic for this measure but I hope there is a better way to handle this
2. In your response (formula for Q2) there is: '...... DISTINCT ACTION) ? For sure ACTION is right field to count in this case ??
I really appreciate your help on this
Regards
with pleasure
because we set the value to'Action_A'.
test this new version:
=count({$<USER_ID = p({$<ACTION=ACTION>} )>} distinct USER_ID)
Regards,
Taoufiq
Thank you! Works fine!
Cheers!