Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mapratt82
Not applicable

I think I need a type of If exist statement? Not sure?

The problem is I have a user exclusive field that has either a 1 or 0 in it. I want if any user on an account has a 1 in the field, for it to be saved to the account as the account have a 1 in the field. Is this possible? Will it need to be in the data load or can it be in the dashboard? Help please!

Thanks

Mark

1 Reply
swuehl
Not applicable

Re: I think I need a type of If exist statement? Not sure?

Maybe something like this?

Accounts:

LOAD AccountID,

          ...

FROM YourAccountTable;

LEFT JOIN (Accounts)

LOAD // UserID,  //commented, don't needed for the aggregation

          AccountID,

          If(Sum(UserExclusiveField) >0, 1,0) as YourNewFlag

FROM YourUserTable

GROUP BY AccountID;