Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
paulyeo11
Valued Contributor III

My script suppose to work :- Money( Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sal

Hi All

I have some break thru , with the help from Vegar , Now i need one more step to reach my target :-

(A)Below script generate field name = rEVENUE :-

If([Reporting Code]>=1 and [Reporting Code]<=15,'rEVENUE') as [rEVENUE],

Is working fine with below expression :-

Money(
Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},$(ColumnDim901)={$(ColumnDim901)}>}Amount*1)/1/1000, $(ColumnDim108)))
,$(vMoneyFormatK))

(B) Below script generate field name = GL_SELECT :-

ApplyMap('MapGL',@1:16T,'9 OTHERS') as [GL_SELECT],

9 OTHERS
1 Revenue
2 COST
3 OTHER INCOME

I create below dimension , so user can select 01_rEVENUE or 1 Revenue :-

WhatIfDimension$(i):
LOAD * INLINE [
Pls select $(i)st Dim,Column$(i)
01_rEVENUE,rEVENUE
1 Revenue,1 Revenue
];
NEXT i;

When user select 1 Revenue , I need the below expression same as section (A) :-

From here :-
=(Sum({<rEVENUE={'rEVENUE'}>}Amount))

Can convert to below , working fine :-
=(Sum({<[GL_SELECT]={'1 Revenue'}>}Amount))

So from here :-

Money(
Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},$(ColumnDim901)={$(ColumnDim901)}>}Amount*1)/1/1000, $(ColumnDim108)))
,$(vMoneyFormatK))

Should convert to below , but my expression got error :-

Money(
Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},GL_SELECT={ $(ColumnDim901) }>}Amount*1)/1/1000, $(ColumnDim108)))
,$(vMoneyFormatK))

Hope some one can share with me where go wrong ?

Edit :- it work fine now with above expression . I mistekenly enter extra bracket. Case close.

 

Paul Yeo

1 Reply
paulyeo11
Valued Contributor III

Re: My script suppose to work :- Money( Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month

Hi All

This post already closed.

Paul