Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to sum 2 column with currency ?

Hi All

Expression 1 Current Asset :-

money(fabs(

Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-0),'YY MMM'))"}

,[Reporting Code] = {

">=50010<=

50090"

     }

     , month = ,year=>}[Amount]/1000))

, $(vCurrencyFormatK))

    

Expression 2 Fixed Asset :-    

    

money(fabs(

Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-0),'YY MMM'))"}

,[Reporting Code] = {

">=20006<=

20061"

     }

     , month = ,year=>}[Amount])/1000)

, $(vCurrencyFormatK))

    

Expression 3 Total Asset :-

    

money(fabs(

Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-0),'YY MMM'))"}

,[Reporting Code] = {

">=50010<=

50090"

     }

     , month = ,year=>}[Amount]/$(Columndim89))/1000)

    

+    

Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-0),'YY MMM'))"}

,[Reporting Code] = {

">=20006<=

20061"

     }

     , month = ,year=>}[Amount]/$(Columndim89))/1000)

, $(vCurrencyFormatK))

    

My issue is why Expression 3 result i get null vlaue. where i go wrong ?

Paul

1 Solution

Accepted Solutions
sivarajs
Specialist II
Specialist II

There was a syntax error after your fabs keyword you have missed a open bracket

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

$(Columndim89)  has non value so your division cause the mistakes ...

if the result of expression 3 is equivalemt to expr. 1 + expr. 2 you csn easily do in expression 3

Column(1) + Column(2)

hope it helps

paulyeo11
Master
Master
Author

Hi Alexa

I am aware that about your propose syntax , but i need to move the coumn expression to another table , which is not go to work , so i hope some one can help me figure out why my total expression not work ?

Paul

paulyeo11
Master
Master
Author

Hi All

I have check and add currency for my QV Doc, but i still unable to sum the Current asset and Fixed Asset amount using 2 expression sum up.

Hope some one can share with me where go wrong ?

Enclsoed my Q\V Doc

Paul

paulyeo11
Master
Master
Author

enclsoe my QV doc. which include the Currency var.

sivarajs
Specialist II
Specialist II

There was a syntax error after your fabs keyword you have missed a open bracket

paulyeo11
Master
Master
Author

Hi Siva

Now i understand , because you remove the money commend on the 2nd expression. you remove 2 braket. and remove  the 1 expression vcurrencyFormatK. therefore you need to add one more at the top.

Thank you very much.

Paul