Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Distinct Flag

Hi,

I have data below,

region      Customer    Color Blue Flag      Car


South            123                 YES                         1

South            123                 YES                         1

South            123                 YES                         1

South                   345           No                        1



I want this chart to be displayed as below


Region           Color blue     Car

South                     1                  2

How can i make expressions doing so? I have count(distinct Car) for the third column but am struggling with the second since the flag is 'Yes' I would like to try to use set analysis if possible.

THanks,

4 Replies
Highlighted
Partner
Partner

Re: Distinct Flag

Assuming you want the count of only Blue Color Car Count, below expression may help.

Count({<[Color Blue Flag] ={"YES"} >} Car)

Highlighted
Champion III
Champion III

Re: Distinct Flag

Try this?

Add a straight table

Dim: region

Expr1: = Sum( Aggr(Count(DISTINCT Car), region, Customer))

Expr:2 = Count(DISTINCT {< ColorBlue = {'Yes'} >} ColorBlue)

//Expr2: = Only({< ColorBlue = {'Yes'} >} ColorBlue)

Capture.PNG

Highlighted
Contributor II
Contributor II

Re: Distinct Flag

I am sorry, the last column is supposed to be customer, not car.

Highlighted
Champion III
Champion III

Re: Distinct Flag

Just use like

= Count(Distinct Customer)