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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
amber2000
Creator
Creator

Calculate % based on parameter

Hello Qlikview wizards,

I'm trying to calculate % based on a parameter.

WH_CdAisle_DescArticle_CWSum_Colli
370
12PBL_TraiteurN11
12PBL_VleesN62
12PBL_VleesY152
12PBL_ZuivelN145

The result I want is this (the last column represents the percentages):

12PBL_VleesY15241,08
12PBL_VleesN6216,76
12PBL_Zuivel + PBL_TraiteurN15642,16
370100

The expression

=Sum({$<[Article_CW] = {"Y"}, [#Colli]>}/ sum({$<[Article] = {"> 99999"}, [WH_Cd] = {"12"}>}[#Colli])

Wont work because I'm deviding two fields with the same result (370/ 370).

I'll attach this example in a qvw so it's easier to follow what I'm trying to accomplish.

Kind regards,

Ambertje

1 Reply
amber2000
Creator
Creator
Author

I managed to calculate the % with the Total function:

=sum({$<[Article] = {"> 99999"}, [WH_Cd] = {"12"}>}[#Colli])/sum(TOTAL([#Colli]))

The only thing that I can't fixe is to join the fields "PBL_Traiteur" and "PBL_Zuivel" together in this expression.

Can Someone please help me with this minor thing (but o so importent to me) please ???

Kind regards,

Ambertje