Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Set analysis - Inner aggregation not considering dimension?

Hi,

I am try to build a table with the following metric by User.

COUNT({<[Security ID] = {"=Count({<$(=vSelectedDate)>} DISTINCT [Account ID]) <= 3"}>} DISTINCT [Security ID])

In a KPI, it gives the correct answer. But if I put it in a table, it seems like the securities are grouped by user, but not the accounts.

In other words, "Count({<$(=vSelectedDate)>} DISTINCT [Account ID]) <= 3" does not consider the user on the table row, but all the accounts for all users.


Is there a way to avoid this?


Thanks!

Tags (1)
1 Reply
Highlighted

Re: Set analysis - Inner aggregation not considering dimension?

Create a new key in your script

AutoNumber([Security ID]&User) as Key

and then try this

COUNT({<Key = {"=Count({<$(=vSelectedDate)>} DISTINCT [Account ID]) <= 3"}>} DISTINCT [Security ID])