Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Dylangkx
Contributor II
Contributor II

Getting sum of a aggregated field based on 2 other fields.

Hi all,

I'm trying to obtain a sum of an aggregated field by 2 different fields (Country and Unique ID)

The base field that I am trying to sum up is as follows:

Count({<[Vehicles] = {1}>} distinct Unique_ID1 & Unique_ID2

I have tried to use this formula 

Sum(Aggr(Sum( (Count({<[Vehicles] = {1}>} distinct Unique_ID1 & Unique_ID2))), Unique_ID2, Country))

but it seems to return me only 0s for the whole column. Would appreciate if there are any solutions to this or if anyone needs clarifications on the question!

Labels (1)
1 Reply
BrunPierre
Partner - Master
Partner - Master

Try

Sum(
Aggr(
Count({<[Vehicles] = {1}>} distinct Unique_ID1 & Unique_ID2)
, Country, Unique_1D2)
)