Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table where I change the format based on a value. Basically I sometimes show dollars and other times quantities.
if(Value=1,num(Sum(Amount),'$#,##0'),
num(Sum(Quantity),'#,##0'))
This works ok in Qlik. I need to convert this to NPrinting.
Is the only way to do this to use Text Columns?
Just wanted to check.
Thanks,
Michael
another thing to ask is what template in NPrinting this needs to apply to?
Hi Michael, I am afraid that is the only way. The only suggestion I have is to use different order with the num function ( i know that it may perform different on large data volume) but i think it may as well influence way in which column is exported:
num( If ( ... ) )
so the main principle here would be to have expression starting from num()
This was a case in the past and was depending on version of QlikView - not sure if that is still a case.
Hello,
Sorry I am not sure what you mean by a different order?
What I am using is something like:
if(Value=1,num(Sum(Amount),'$#,##0'),
num(Sum(Quantity),'#,##0'))
Condition where Value=1 only appears one time at the very end of the table.
Also I don't use any qlik or nprinting summary or total functions.
Michael
I meant
num( if(Value=1,Sum(Amount),Sum(Quantity),if(Value=1, '$#,##0' , '#,##0'))
Hello,
Are you saying that this way may cause a problem:
if(Value=1,num(Sum(Amount),'$#,##0'),
num(Sum(Quantity),'#,##0'))
So far it seems to work.
Thanks,
Michael
I said that it used to behave differently in the past as one expression used to export numbers as text and another used to export as numbers.
I have not done extensive testing recently on this so I will not state that this is still the case, but it is something worth testing if you have some issues in regards to whether numbers are exported as text or numbers.
It is also worth noting that this is not going to fix the main problem you asked in the original question in this thread so I guess I went little bit of the topic - sorry.
another thing to ask is what template in NPrinting this needs to apply to?
Thank You,
It looks like what I have is working.
Michael