Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
nikita23
New Contributor III

Aggr with set analysis

Hi All,

I want to group by my required data  on the basis of DF_PACKNR with distinct POD numbers so I have used the below aggr function for it and its working fine.

count(aggr(distinct(DF_POD),DF_PACKNR))

 

But Now I want to apply one more condition on it with different column where need to sort the data on the basis of DF_USER='VR1'.

after applying set analysis on it, Its showing no data.

 

could you please provide some solution for it to apply set analysis with Aggr.

6 Replies
Partner
Partner

Re: Aggr with set analysis

It would be easier to provide if you could post some sample data and an example on how you are trying to apply Set to your expression.

Are you applying the set inside the count or inside the aggr or both?
Does your SET look like this: {$<DF_USER={'VR1'}>} ?
#OnVacation #BetweenJobs.
Please ekskuse my Norglish and Swenglish typos.
nikita23
New Contributor III

Re: Aggr with set analysis

Hi Vegar,

 

I am applying like this as below:

AGGR(COUNT(DISTINCT {<DF_USER={'VR1'}>} DF_POD), DF_PACKNR)

Partner
Partner

Re: Aggr with set analysis

Have you tried
AGGR( {<DF_USER={'VR1'}>} COUNT(DISTINCT {<DF_USER={'VR1'}>} DF_POD), DF_PACKNR)
?
#OnVacation #BetweenJobs.
Please ekskuse my Norglish and Swenglish typos.

Re: Aggr with set analysis

Have you tried this?

Count({<DF_USER = {'VR1'}>} Aggr(DISTINCT Only({<DF_USER = {'VR1'}>} DF_POD), DF_PACKNR))

or this

Count(Aggr(DISTINCT Only({<DF_USER = {'VR1'}>} DF_POD), DF_PACKNR))

 

nikita23
New Contributor III

Re: Aggr with set analysis

Hi Sunny,

 

Its now working fine in our scenario I mean its giving wrong counts.

Re: Aggr with set analysis

Would you be able to share a sample to show what you are getting and provide the number/s you are hoping to get?