Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nikita23
Contributor III
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
Vegar
MVP
MVP

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'}>} ?
nikita23
Contributor III
Contributor III
Author

Hi Vegar,

 

I am applying like this as below:

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

Vegar
MVP
MVP

Have you tried
AGGR( {<DF_USER={'VR1'}>} COUNT(DISTINCT {<DF_USER={'VR1'}>} DF_POD), DF_PACKNR)
?
sunny_talwar

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
Contributor III
Contributor III
Author

Hi Sunny,

 

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

sunny_talwar

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