Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

New Contributor III

Percentage count ?


TripNum   Traveler  Type

128            A          Direct

123            B          Indirect

198            C          Direct

190            D          Online

908            E          Indirect


TripNum   Traveler  Type

128             A         Rental

153             B         Rental

190             D        -

164             E         Rental

Now I used the following expression to the TripNum % :

count({<TripNum ={"=count(distinct Type>0"}>} distinct  TripNum)

/Count({<Type=>} distinct (TripNum))

I am getting the TripNum %, but the problem here is when I select Rental in Type filter,

it is calculating for all tripnum count, instead I want it to consider only count from Table2.

Without any selections applied, it is working fine.

how can get % for only rental : actual o/p: 3/9= 33.33

expected %= 3/4=75%,

2 Replies

Re: Percentage count ?

Can you please post application


count({<TripNum ={"=count(distinct Type>0"}>} distinct TripNum)

/Count({<Type=>} TOTAL TripNum)

Life is so rich, and we need to respect to the life !!!

Re: Percentage count ?

Are these two tables getting concatenated together in your data model? Can you elaborate the reason for seeing the information from only table 2 when Rental is selected?

Community Browser