Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

variable in text box

Hi All,

I have a variable that works out an average for me, i am using this in a straight table with a product dimension then i have the totals summed up giving me a total of all the averages.  (Top table below)

Does anyone know how i can use the variable in a text box but displaying the total instead

this is my variable

$(vTargetAvg_Listings)

=

avg({$<

[it_target_type]={"Listings"},

[ld_Dist]={"4"},

[ld_Outlet_Check_Date]={">=$(=Timestamp(FirstDayCurrentFiscalYear))"}

>}

[it_target_value]

)

Capture.JPG

1 Solution

Accepted Solutions
MVP
MVP

Re: variable in text box

You'll probably need to use advanced aggregation, i.e. the aggr() function, maybe like this:

=sum(

aggr(

avg({$<
[it_target_type]={"Listings"},
[ld_Dist]={"4"},
[ld_Outlet_Check_Date]={">=$(=Timestamp(FirstDayCurrentFiscalYear))"}
>}
[it_target_value]
)

,Brand )

)

2 Replies
MVP
MVP

Re: variable in text box

You'll probably need to use advanced aggregation, i.e. the aggr() function, maybe like this:

=sum(

aggr(

avg({$<
[it_target_type]={"Listings"},
[ld_Dist]={"4"},
[ld_Outlet_Check_Date]={">=$(=Timestamp(FirstDayCurrentFiscalYear))"}
>}
[it_target_value]
)

,Brand )

)

Not applicable

Re: variable in text box

Great, thanks for the answer

Community Browser