Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
mstoler
Partner - Specialist
Partner - Specialist

Pixel Perfect custom format in a column

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

 

 

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

another thing to ask is what template in NPrinting this needs to apply to?

cheers Lech, 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 to the problem.

View solution in original post

7 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

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.

cheers Lech, 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 to the problem.
mstoler
Partner - Specialist
Partner - Specialist
Author

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

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I meant

num( if(Value=1,Sum(Amount),Sum(Quantity),if(Value=1, '$#,##0' , '#,##0'))

cheers Lech, 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 to the problem.
mstoler
Partner - Specialist
Partner - Specialist
Author

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

 

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

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. 

 

cheers Lech, 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 to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

another thing to ask is what template in NPrinting this needs to apply to?

cheers Lech, 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 to the problem.
mstoler
Partner - Specialist
Partner - Specialist
Author

Thank You,

It looks like what I have is working.

Michael