Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III
Creator III

Coding Help Required...

Hello,

I have the following code where in if i choose any year i get proper values but if i select a year and a month i do not get proper values ,

Please help..

Thanks and Regards,

Rohit

(SUM({$<FinancialYear=,FiscalYear={$(=max(FiscalYear))},MonthName=,Quarter=

,[Posting Date]={">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]))"}

>}[Gross Sales Amount])

-SUM({$<FinancialYear=,FiscalYear={$(=max(FiscalYear))},MonthName=,Quarter=

,[Posting Date]={">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]))"}

>}[Sales Return Amount])

-

fabs(SUM({$<FinancialYear=,FiscalYear={$(=max(FiscalYear))},MonthName=,Quarter=

,[Posting Date]={">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]))"}

,[Is SRN]={0},

[GL Code]={"4000001","4000002","4000003","4000004","4000005","4000006","4000007","4000008","4000010","5000015","5000013","5000014","5000016"},FiscalYear={$(=max(FiscalYear))}>} [Credit Note Amount]))

+

SUM({$<FinancialYear=,FiscalYear={$(=max(FiscalYear))},MonthName=,Quarter=

,[Posting Date]={">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]))"},

[GL Code]={"4000001","4000002","4000003","4000004","4000005","4000006","4000007","4000008","4000010","5000015","5000013","5000014","5000016"},FiscalYear={$(=max(FiscalYear))}>} [Debit Note Amount]))

/100000

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If MonthName is the field you select your month in then remove MonthName=, from the expression since that's making the expression ignore your selection.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
er_mohit
Master II
Master II

Try to add Month= in all like this

(SUM({$<FinancialYear=,Month=,FiscalYear={$(=max(FiscalYear))},MonthName=,Quarter=

,[Posting Date]={">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]))"}

>}[Gross Sales Amount])

hope it helps

Gysbert_Wassenaar

If MonthName is the field you select your month in then remove MonthName=, from the expression since that's making the expression ignore your selection.


talk is cheap, supply exceeds demand