Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have attached a part of our order data in a qvw file. i have the following fields:
What i need to do is to calculate for a specific PaymentType (Let's say PaymentType = 3), number of unique UserId's who doesn't have a failed payment log (PaymentStatus = 0) but a succeeded transaction (PaymentStatus = 1). And i need it with the Date field in dimension.
I tried to use p() and e() functions in set analysis but it excluded users for all logs, disregarding the date dimension.
i tried : COUNT({<PaymentType = {"3"}, PaymentStatus = {1},UserId = e({<PaymentStatus = {0}>})>}DISTINCT UserId)
Thanks in advance.
Perhaps this:
COUNT({<PaymentType = {3}, PaymentStatus = {1},UserId = e({<PaymentType = {3},PaymentStatus = {0}>})>}DISTINCT UserId)
Hi,
Try below
=COUNT({<PaymentType = {3}, PaymentStatus = {1})>}DISTINCT UserId)
Regards
ASHFAQ
Hi,
the e() function still excluding UserId's for all time logs. What i need is to calculate for each day count of unique users who doesn't have a log with PaymentStatus = 0. The e() function is disregarding the date dimension and exclude users for all days.
try it like this
COUNT({<PaymentType = {"3"}, PaymentStatus = {1},UserId = e({<PaymentStatus = {0}>}UserID)>}DISTINCT UserId)
regards,
MT
Ah, I understand what you're trying to do now. You cannot use set analysis because that calculates a set per chart, not per row, i.e. per date value in your case. Try adding a summary table in the script.
Hi Ashfaq,
Your answer gives the count of users who have at least one succeeded payment log. Among them i need to exclude users who have failed (PaymentStatus = 0) at least once.
If we split users in a daily basis like the set i attached below. I only need users who did not failed.
the result did not change
This is a helpful answer.
It helps but to use it i need to store an extra table with a row count of Unique User Id per date.
But seems like there is no other way to do it.
Thanks