Forum

This content is now out of date.

Visit Our Community

How to format the currency ISO code into a flag?

Hi guys,

Is this a way to format the currency ISO code into a flag/symbol? e.g., USD to $ and EUR to ?.

Also, what I should do in order to use flag formatter to format the country ISO code into a flag? If I use it now, not image is displayed.

Thanks,
Michael
Hi Michael,

Yellowfin ships with a 'Flag Formatter' that uses an ISO code to display the relevant flag. You just need to apply this format to the ISO code column.
See screenshot below:

Forum image


However, displaying the relevant currency symbol depends on how your tables are setup.
If you have a join that matches the ISO code against the symbol then it's extremely easy by creating a calculated field and adding this to your report using a calculation like below:

E.g.
'Symbol' + 'Invoiced amount'.

However if you don't have the Symbol matched against the relevant column you can also do this manually in a calculated field.
Please note [i]concatenation operators differ from database to database.[/]i

E.g.
Case When ISO = 'AU' then '$' + 'Invoiced amount' When ISO = 'IT' then '?' + 'Invoiced amount' END

Please let me know if you run into any issues with this.

Regards,
David
Thanks David. I will give a try. Is it possible to map the currency with flags (not just the currency symbols)? In most of case, just the country flag; for EU, the blue EU flag. Is it possible to link to external images in the calculated field (or the link is provided as the values of a table field)?

Thanks,
Michael
Hi Micheal,

If you have these images in your database, and this table is linked to the currency table then you can just use the 'image' formatter on the column that contains the images.
Please see the link below for more information.

Return an image in your results

You can also use this field in a calculated field if necessary.

Please let me know this isn't clear or I have misunderstood what you are trying to do.

Regards,
David
Hi Everybody:

I was wondering if the same sort of logic could be applied to a unit conversion scenario.

We have some clients who need Imperial units and others who need Metric units. We were trying to come up with a method whereby in our database we could store everything in, say, Metric, but somehow give the user an easy way to show their data in Imperial units?

Has anybody dealt with this in the past?
Hi,

I have moved the above question to the post:
How can I display Metrics or Imperial untis


Please see above post for answer.

Regards,
David