Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0')), LEVEL2, LEVEL1) AS LEVEL4
When I load this line, it will output in a pivot table showing 16.3 because in my excel sheet that I load from, 16.30 is shown as 16.3(For I don't know what reason. My company say its like that).
What I would like to do is to change the 16.3 showing in the pivot table to '16.30'. Is there any way I can do it like for example
IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0')), LEVEL2 AS '16.30', LEVEL1) AS LEVEL4?
The above code does not work btw. Thank very much
try
num(IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0')), LEVEL2 AS '16.30', LEVEL1)#,##0.00) as level4
May be use Num funciton like below
Num(IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0')), LEVEL2, LEVEL1),'00.00') AS LEVEL4
My excel is like this
I know my excel does not contain 16.30 but as mentioned, it treats 16.3 as 16.30.(I think it is some formatting issue)
when I use this code
IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0')), LEVEL2, LEVEL1) AS LEVEL4
It works and it loads into qlikview as shown below
As you can see, 16.3 is loaded with the above code. However, I want to display it as 16.30 because my boss wants it displayed as such. How do I manually change it to show as 16.30?
So then Your if statment wont work, 16.30 doesent exsist. Try this instead.
IF(LEVEL2 = '16.3' AND (len(LEVEL3 > '0')), num(LEVEL2,'##,##'), LEVEL1) AS LEVEL4
This should work
Num(IF(LEVEL2 = '16.3' AND (len(LEVEL3) > '0'), LEVEL2, LEVEL1),'#,##0.00') AS LEVEL4
Try!
What is Your DecimalSep?
Is it a . or a ,?
if it is a . use this:
IF(LEVEL2 = '16.3' AND (len(LEVEL3 > '0')), num(LEVEL2,'##.##'), LEVEL1) AS LEVEL4
if it is a , use this:
IF(LEVEL2 = '16.3' AND (len(LEVEL3 > '0')), num(LEVEL2,'##,##'), LEVEL1) AS LEVEL4