Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.

paulyeo11
Valued Contributor II

Expression work in QS but not work in QV

Hi All

I have below expression work fine in QS :-

Aggr(

Rangesum( Above(

Sum(

{<Year={'>$(=year(today())-2)'}>}

sales/1000)

,0,rowno()))

,year,(month,(NUMERIC,ASCENDING)))

When i use the above same expression to QV , it does not work , When i remove the Aggr(

Rangesum( Above( and it work fine ( ref to chart 1 ) :-

Sum(

{<Year={'>$(=year(today())-2)'}>}

sales/1000)

May i know why ?

Paul

1 Solution

Accepted Solutions

Re: Expression work in QS but not work in QV

Are you using QV12? If not then the new sorting syntax won't work. Look here: The sortable Aggr function is finally here!

Aggr(

Rangesum( Above(

Sum(

{<Year={'>$(=year(today())-2)'}>}

sales/1000)

,0,rowno()))

,year,(month,(NUMERIC,ASCENDING)))

6 Replies
Gabriel
Valued Contributor III

Re: Expression work in QS but not work in QV

Hi,

You need another aggregation before AGGR

Sum(

Aggr(

Rangesum( Above(

Sum(

{<Year={'>$(=year(today())-2)'}>}

sales/1000)

,0,rowno()))

,year,(month,(NUMERIC,ASCENDING))))

paulyeo11
Valued Contributor II

Re: Expression work in QS but not work in QV

Hi Gabriel

Thank you for sharing.

I try but it does not work .

Paul

Re: Expression work in QS but not work in QV

Are you using QV12? If not then the new sorting syntax won't work. Look here: The sortable Aggr function is finally here!

Aggr(

Rangesum( Above(

Sum(

{<Year={'>$(=year(today())-2)'}>}

sales/1000)

,0,rowno()))

,year,(month,(NUMERIC,ASCENDING)))

paulyeo11
Valued Contributor II

Re: Expression work in QS but not work in QV

Hi Sunny

I read the link you posted to me , if i am correct , they post is mentioned that new feature is support QS and ver 12.

Since now i am still using ver 9 , so your posted expression with the red high lighted word on sort month , i have tested it is not working in ver 9 , but work in QS.

So can i said that ver 9 i am unable make it work , and i need to look for alternative ?

Paul

Re: Expression work in QS but not work in QV

‌yup... That's exactly what it means. You need to update  

paulyeo11
Valued Contributor II

Re: Expression work in QS but not work in QV

Hi Sunny

it is okay , since presentation of chart , i can using QS.

Paul