Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nabilbrahimi
Contributor II
Contributor II

Pick Match() and Aggr Count

Hi,

I have an issue to display value desired with pick match().

I would like to display the total number of unique trucks , in my case I have 47 from Jan. to Apr.

sum(aggr(Count(DISTINCT {<OWN_ship_flag = {"1"}  >} Plate_num),Month))

QV_1.PNG

When I use same formula with Pick Match()  I have no result:

pick(match(Truck_KPI,'Own Truck Utilization'),

sum(aggr(Count(DISTINCT {<OWN_ship_flag = {"1"}  >} Plate_num),Month))  )

QV_2.PNG

with NODISTINCT qualifier I have a result but not the figure I'm expecting which is 47.


Can someone help?


Thank you!

2 Replies
sunny_talwar

This is an issue and you can read related stuff here

http://www.naturalsynergies.com/q-tip-14-aggr-and-synthetic-dimensions/

May be try this

Pick(Match(Truck_KPI,'Own Truck Utilization'), Count(TOTAL DISTINCT {<OWN_ship_flag = {"1"}  >} Plate_num))

nabilbrahimi
Contributor II
Contributor II
Author

Hi Sunny,

Thanks for the tip, unfortunately TOTAL does not help....

However by adding synthetic dimension name in group by solved the issue:

pick(match(Truck_KPI,'Own Truck Utilization'),

sum(aggr(Count(DISTINCT {<OWN_ship_flag = {"1"}  >} Plate_num),Month, Truck_KPI))  )