Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

mhmhmh91
New Contributor

Round all numbers in Millions to #,##0.00M

Hi all,

Is there a way to round all numbers in Millions to #,#0.00M by setting it up in Load Script?

I know I could do it in expressions by dividing my numbers by 1,000,000 and assign a format of '#,##0.00M'.

I am wondering can I do this in the script for all numbers so I don't have to repeat actions above in all expressions.

Thank you,

Mandi

3 Replies
duffman1968
New Contributor III

Re: Round all numbers in Millions to #,##0.00M

Hey Mandi,

Yes you can.

Here is an example:

Testformat:

LOAD

    num(Sum(TotalRevenue), '#,#0.00M')   AS 'Millions'

FROM [<your source>] (qvd)

Where

Year(Date([DateKey])) = 2017;

Really just focus on the num statement.

Hope this helps.

Regards,

Patrick

mhmhmh91
New Contributor

Re: Round all numbers in Millions to #,##0.00M

Hi Patrick,

Thank you for response. I am wondering if there is a way that I can round any numbers together without indicating the column names (TotalRevenue in your example)?

Thank you,

Mandi

vinieme12
Esteemed Contributor II

Re: Round all numbers in Millions to #,##0.00M

No you cannot

Community Browser