Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
AH
Creator III
Creator III

Gross Amount Calculation by Currency

Hi,

I have different currency in my dashboard and i have to calculate the gross amount by each currency. I did that previously by sales type but now i have to do that based on currency. I have currency like , USD, GBP, EUR, DKK etc.

I used this expression previously: =fabs(num(Sum({<SalesType = {'FT'}>}TotalLineAmount),'##,##0'))

Any Suggestions?

Thanks,

Shan

6 Replies
Not applicable

=fabs(num(Sum({<SalesType = {'FT'},currency={'USD'}>}TotalLineAmount),'##,##0'))

above grossamount for salestype FT for USD only


=fabs(num(Sum({< currency={'USD'}>}TotalLineAmount),'##,##0'))

just currency USD


or you can try using total

=fabs(num(Sum( TOTAL {<SalesType = {'FT'},currency={'USD'}>}TotalLineAmount),'##,##0'))

above grossamount for salestype FT for USD only

=fabs(num(Sum (TOTAL {< currency={'USD'}>}TotalLineAmount),'##,##0'))

AH
Creator III
Creator III
Author

Hi Mario,

Thanks for your Nice reply. I want to apply that in Chart. How do i do that for all the currency in a single chart?

Thanks,

Shan

Not applicable

You can create a variable like

vCurrency = Only(Currency)  and have 'Always one selected' option checked in the currency list box.

Now in you expression use this variable

=fabs(num(Sum({< currency={"$(vCurrency)"}>}TotalLineAmount * ConversionFactor),'##,##0'))


I am sure there would be a conversion factor for this to work so you might have to probably use that as well.


Thanks

AH
Creator III
Creator III
Author

Conversion Factor? Does that mean exchange rate?

Thanks,

Shan

Not applicable

Have you tried to just put Currency as a dimension and then as expression sum(whateveryouwant)

Not applicable

Yes. Say you have your actual transaction in USD and to covnert it into other currencies you need an Exchange rate table that needs to be associated with the Data Model for this to work.