Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have implemented this expression to make category against the percentange.
RangeSum(Above(Sum(EASYLOAD_RECH_AMT_SUM), 0, RowNo()))
Could you pls tell me how can i translate the logic into qlikScript
Regards
Noman
Hello guys?
Anyone?
Hi @noman212
You are using this expression against a percentage? I don't really get that info without a screenshot or a sample. However, often when I see the rangesum above expression it can be solved by a normal SUM() when implementing an "as of table" in the script.
Take a look at HICs blog post on the as of table topic and see if you can use it to solve your percentage scenario. https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130
Hi @Vegar thanks for your reply.
i used this expression to calculate accumulated Sum and now i want to translate this expression into my script against ID.
i applied
if(FRANCHISE_CD=Previous(FRANCHISE_CD), RangeSum(EASYLOAD_RECH_AMT_SUM, Peek('CUM_QTA_MOV_1YB'))
,Sum(EASYLOAD_RECH_AMT_SUM)) as CUM_QTA_MOV_1YB
this in my script but unable to get my result.
It could be your aggregations that is causing you trouble. Are you using group by or not? Try rephrasing to see if this approach is better.
if(FRANCHISE_CD=Previous(FRANCHISE_CD), Peek('CUM_QTA_MOV_1YB'), 0)
+ EASYLOAD_RECH_AMT_SUM as CUM_QTA_MOV_1YB
YEs i am using group by with 2 Ids
Franchise ID and MSNID.
the solution you proposed in script is working but it aggr on both IDS but i want to aggr on 1 franchise ID only.
Kindly suggest how can i bypass MSNID in this
if(FRANCHISE_CD=Previous(FRANCHISE_CD), Peek('CUM_QTA_MOV_1YB'), 0)
+ EASYLOAD_RECH_AMT_SUM as CUM_QTA_MOV_1YB
Noman, use the following Design Blog link to search that area for 'AGGR' posts, there are quite a few, was not sure which ones might help you in this case, but I think one of the existing ones might!
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett