Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

jhlovenc
Contributor II

Create fag when two conditions are met

I would like to creat ea flag for when these two conditions are met:

IF(Count(Distinct(First_Key) <> Count(Distinct(Second_Key), 1, 0)))

but I don't quite get the syntax. Does this need to be a set analysis?

I just want to rerutn a 1 if the number of unque first_key is not the same as the number of unique second_key.

1 Solution

Accepted Solutions
MVP
MVP

Create fag when two conditions are met

Hi

You have some misplaced parentheses. This should work:

IF(Count(Distinct First_Key) <> Count(Distinct Second_Key), 1, 0)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
1 Reply
MVP
MVP

Create fag when two conditions are met

Hi

You have some misplaced parentheses. This should work:

IF(Count(Distinct First_Key) <> Count(Distinct Second_Key), 1, 0)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein