Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jjustingkm
Creator II
Creator II

Agg function Issue

I have an aggregate function like this .

=sum(aggr({$<Region={'NA'}>} count(distinct ID), Gender))

+sum(aggr({$<Region={'SA'}>} count(distinct ID), Gender))

 

When I use it in the graph against year, it gives correct result if I select a particular year, but gives incorrect result if I dont select any year.

 

Please help.

 

1 Reply
Kushal_Chawda

@jjustingkm  you need to add year dimension in aggr function

=sum(aggr({$<Region={'NA'}>} count(distinct ID), Gender, Year))

+sum(aggr({$<Region={'SA'}>} count(distinct ID), Gender, Year))