Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Set Analysis Issue

Hello,

I have attached a part of our order data in a qvw file. i have the following fields:

Screenshot_1.jpg

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.

Tags (2)
8 Replies
MVP & Luminary
MVP & Luminary

Re: Set Analysis Issue

Perhaps this:

COUNT({<PaymentType = {3}, PaymentStatus = {1},UserId = e({<PaymentType = {3},PaymentStatus = {0}>})>}DISTINCT UserId)


talk is cheap, supply exceeds demand

Re: Set Analysis Issue

Hi,

Try below

=COUNT({<PaymentType = {3}, PaymentStatus = {1})>}DISTINCT UserId)

Regards

ASHFAQ

Not applicable

Re: Set Analysis Issue

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.

Not applicable

Re: Set Analysis Issue

try it like this

COUNT({<PaymentType = {"3"}, PaymentStatus = {1},UserId = e({<PaymentStatus = {0}>}UserID)>}DISTINCT UserId)

regards,

MT

MVP & Luminary
MVP & Luminary

Re: Set Analysis Issue

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.


talk is cheap, supply exceeds demand
Not applicable

Re: Set Analysis Issue

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.

set.png

Not applicable

Re: Set Analysis Issue

the result did not change

Not applicable

Re: Set Analysis Issue

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