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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need to set different number forrmating for inline table

Hi,

I am new to QlikView. In my project, I created an inline table with Actual, Thousands and Millions value and used it for calculation in my expressions.

Now I need to set different number format(i.e) Without decimal places for Actuals and with 2 decimal places for Millions and Thousands.

How to set this number format in expressions for the inline values?

Can anyone help me with this?

1 Solution

Accepted Solutions
prieper
Master II
Master II

something is weird in your formula,

would expect to have the formula to read sum(Sales) / $(=Factor_Value).

Further the $(=) is not required.

So your formula may read

SUM(Sales / Factor_Value).

If you wish to keep the formula, you may change the inline-table to read for e.g. Millions then 1/1000000.

Formatting might be done in the settings, else you may also store the formatting assigned to the _Factor in the inline-table.

Formulas then to read

NUM(SUM(Sales/Factor_Value), _MyFormat)

Inline then may look:

Format:

LOAD * INLINE [FormatName, FormatFactor, Format

                Actual, 1, "#,##0.00"

                Thousand, 1000, "#,##0"];

               

HTH Peter

edit: format-Table inserted

View solution in original post

12 Replies
prieper
Master II
Master II

would you please share an example?

qlikview979
Specialist
Specialist

Hi,

We can set the number format in Number tab.

would you Please share the sample app.

vinieme12
Champion III
Champion III

please post sample app

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes we can help you with this. Please post an example of your INLINE table.

Anonymous
Not applicable
Author

Factor_Table:

LOAD * INLINE

[

    Factor_Id, _Factor, Factor_Value

    1, Millions, 1

    2, Thousands, 1000

    3,   Actuals, 1000000

];

In dashboard created a list box with "Actuals, Millions, Thousands"

and using the Inline table value in my expression.

example:  sum(Sales)*$(=Factor_Value)

In this expression, I need to set the number format as #,##0 when the user clicks Actuals in the list box and need to set the number format as #,##0.0 when the user clicks Millions and Thousands list box.

how to set this. I tried using If statement in the expression. but no change.  can you help with this?

Anil_Babu_Samineni

May be this?

=If(sum(Sales)*$(=Factor_Value)/1000000000 > 1,Num(sum(Sales)*$(=Factor_Value)/1000000000,'$#,###B'), Num(sum(Sales)*$(=Factor_Value)/1000000,'$#,###M'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
prieper
Master II
Master II

something is weird in your formula,

would expect to have the formula to read sum(Sales) / $(=Factor_Value).

Further the $(=) is not required.

So your formula may read

SUM(Sales / Factor_Value).

If you wish to keep the formula, you may change the inline-table to read for e.g. Millions then 1/1000000.

Formatting might be done in the settings, else you may also store the formatting assigned to the _Factor in the inline-table.

Formulas then to read

NUM(SUM(Sales/Factor_Value), _MyFormat)

Inline then may look:

Format:

LOAD * INLINE [FormatName, FormatFactor, Format

                Actual, 1, "#,##0.00"

                Thousand, 1000, "#,##0"];

               

HTH Peter

edit: format-Table inserted

Anonymous
Not applicable
Author

No, it didn't work

Anonymous
Not applicable
Author

No changes happened.

Is it possible to set different number formats for each values in a Inline table?