Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
lprasanth
New Contributor II

p() function for multiple fields in qlikview

Hi guys,

How can I write the following function

sum({<encours_date_forescast=P(data22,data23,data24,data25,data26,data27,data28
>}encours_qte_forescast * $(vfilter5bis)),0)

 

btw data22=only({<idDateStkP={1}>}[date stock projection]) 

                                 .

                                 .

         data28=only({<idDateStkP={8}>}[date stock projection]) 

pls help me out on this one

Labels (2)
4 Replies
pradosh_thakur
Honored Contributor II

Re: p() function for multiple fields in qlikview

is data22 .. data28 variable?

 

if yes then  try this

sum({<encours_date_forescast={$(data22),$(data23),$(data24),$(data25),$(data26),$(data27),$(data28)}
>}encours_qte_forescast * $(vfilter5bis))

why is ,0) is there in your expression btw?

Learning never stops.
lprasanth
New Contributor II

Re: p() function for multiple fields in qlikview

Hi pradosh,

   those are if conditions, not the variable, this is how it look like

if(idDateStkP='1',[date stock projection]) as data21,

pradosh_thakur
Honored Contributor II

Re: p() function for multiple fields in qlikview

but you have mentione data22 to data 28 as only function?

 

can you tell me what you want to achieve logically, it will be easier to provide a solution.

Learning never stops.

Re: p() function for multiple fields in qlikview

May be it will help if you are able to provide few rows of data and explain what you are trying to get out of it