Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Choice of monetary units for displaying numeric values

Hello!
How in the click sense
I can realize the possibility of choosing monetary units to display numerical values in different formats, an example in billions, millions, thousands?
For example, you need to display a report with a display of monetary units in billions, millions, and so on.
I made a variant of displaying currency units through the expression:
 

п.png

But this option is not suitable, because for each output field, you need to write such a transformation in the expression.
And if I want to change the unit of measurement, accordingly, I need to change the code everywhere.
Is it possible to do something at a global level?
And also to realize the possibility of selecting units of measurements using the button? For example:

пg.png

 

Thank you!
Yours faithfully,
Elena

 

3 Replies
jaumecf23
Contributor III

Re: Choice of monetary units for displaying numeric values

Hi,

This is only a suggestion. You can create an Inline table with all the mesuares that you want to transform your numeric values. Something like that:

Type_Mesure,Type_Value

Hundreds -> 100

Thousands -> 1000

...

Then you can create a list box with only showing the field Type_Mesure. In this way the user will be able to select how to see the data.

Then you need to modify your expressions with something like this:

if(GetSelectedCount(Type_Mesure)=1,Numeric_Value\GetFieldSelections(Type_Value),Numeric_Value)

Then depending on the selections the Numeric_value will be transformed. If any selections is done, the field will be showing with no transformation.

martijn13
New Contributor II

Re: Choice of monetary units for displaying numeric values

Hello Elena,

You could easily move the logic to the load script as variable function to maintain the function centrally.

Eg: Number format function

SET vSize = Div(Log10($1),3);

SET vFormatNumber = Dual(Num($1/Pow(10,3*$(vSize($1))),'#,##0')&' '&Pick($(vSize($1)),'K','M','B','T'),$1);

In your sheets, you can call this variable:

=$(vFormatNumber('parameter'))

vlad_komarov
Valued Contributor III

Re: Choice of monetary units for displaying numeric values

Elena,

You can use Qlik's "Auto Number Formatting option" as well.

It usually works for common case (Thousands, Millions, Billions)....

Screen Shot 2017-06-28 at 9.55.02 AM.png

The only problem with KPIs will be the currency formatting issue (it's not supported in Auto-mode) , so I've added some text for the title..

Удачи!

Regards,

Vladimir

Community Browser