Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Partner
Partner

Why it does not aggr(rangesum) after i filter

Edit1: I already upload the qvf file... for reference thanks..


Edit2: I update my formula



from: "((Aggr(RangeSum(Above(Sum({<GL2= {11}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month]))  ) - ((Aggr(RangeSum(Above(Sum({<GL2= {21}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1 )"


into:


from: "((Aggr(RangeSum(Above(Sum({<GL2= {11},[DOCDATE.autoCalendar.Month]=>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month]))  ) - ((Aggr(RangeSum(Above(Sum({<GL2= {21},[DOCDATE.autoCalendar.Month]=>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1 )"



Hi good day every one i just created a financial KPI last week with the help of some people here in our community and it was good... but after i check every details of it i notice that there is something went wrong after i filter...

Working Error.jpg

the 1st chart is perfect the figure shows exactly what i want..

but after i filter a month everything went wrong...

ohh by the way this is my formula

"((Aggr(RangeSum(Above(Sum({<GL2= {11}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month]))  ) - ((Aggr(RangeSum(Above(Sum({<GL2= {21}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1 )"

Working Error part 2.jpg

can some one have any idea why it happens?

thanks

Message was edited by: Reynaldson Aceberos QVF file is added

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Why it does not aggr(rangesum) after i filter

i update my formula into

'=Aggr(RangeSum(Above(Sum({<GLHeader= {1}, [DOCDATE.autoCalendar.Month]=>} GLTOTAL), 0, RowNo())), Branch, Month)' and now even if i select any month it will not take any effects on figures... 



thanks alot mate for helping me...


-rey


View solution in original post

12 Replies
Highlighted

Re: Why it does not aggr(rangesum) after i filter

May be you did one filter extra from selector? If All fine, May be round up with Sum(Aggr(..))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Partner
Partner

Re: Why it does not aggr(rangesum) after i filter

thanks for that quick reply

i got no luck mate i try to wrap my formula with sum()

sum(((Aggr(RangeSum(Above(Sum({<GL2= {11}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month]))  ) - ((Aggr(RangeSum(Above(Sum({<GL2= {21}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1 )) but still same result

Highlighted

Re: Why it does not aggr(rangesum) after i filter

Equation should cover all elements like

(Sum(Aggr(RangeSum(Above(Sum({<GL2= {11}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) - Sum(Aggr(RangeSum(Above(Sum({<GL2= {21}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
luismadriz
Valued Contributor

Re: Why it does not aggr(rangesum) after i filter

Hi,

Maybe the problem is the Above function (along with RowNo) as it may lose its meaning after the selection.


You may want to convert this chart to a table for review and also share the unaggregated data for troubleshooting?


Cheers,

Luis

Highlighted
Partner
Partner

Re: Why it does not aggr(rangesum) after i filter

thanks mate

well i use same concept on total asset and i dont have any problem on it...

Aggr(RangeSum(Above(Sum({<GLHeader= {1}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])

then i use the same concept on getting for the working capital but i dont get what i expected result

(Sum(Aggr(RangeSum(Above(Sum({<GL2= {11}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) - Sum(Aggr(RangeSum(Above(Sum({<GL2= {21}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1)

wait ill upload my qvf file

im looking where to attached it...

thanks

Highlighted

Re: Why it does not aggr(rangesum) after i filter

My assumption may match in your rek, Perhaps this?

(Sum(Aggr(RangeSum(Above(TOTAL Sum({<GL2= {11}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) - Sum(Aggr(RangeSum(Above(TOTAL Sum({<GL2= {21}>} GLTOTAL), 0, RowNo())), BRANCHNAME, [DOCDATE.autoCalendar.Month])) *-1)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
luismadriz
Valued Contributor

Re: Why it does not aggr(rangesum) after i filter

Hi, you may not be able to upload it on this post, as it seems you can attach documents only when the post is created. I hope they fix that.....

If you want, send it via email

Cheers

Luis

Highlighted
Partner
Partner

Re: Why it does not aggr(rangesum) after i filter

it takes me time to find it..

but i manage.. i edit my thread and upload the qvf..

thank you very much mate.. 

Highlighted
luismadriz
Valued Contributor

Re: Why it does not aggr(rangesum) after i filter

Total Assets also fails after selection.... I mean changes its value

I'll take a look,

Luis