Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
would you please share an example?
Hi,
We can set the number format in Number tab.
would you Please share the sample app.
please post sample app
Yes we can help you with this. Please post an example of your INLINE table.
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?
May be this?
=If(sum(Sales)*$(=Factor_Value)/1000000000 > 1,Num(sum(Sales)*$(=Factor_Value)/1000000000,'$#,###B'), Num(sum(Sales)*$(=Factor_Value)/1000000,'$#,###M'))
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
No, it didn't work
No changes happened.
Is it possible to set different number formats for each values in a Inline table?