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: 
1302aman
Contributor
Contributor

nPrinting custom number format in chart

I need seprator for Thousand, Million , Billion in Pixel perfect nprinting report. 

For Example in chart it should print like below 

 

2543560000           2.5B

8551200                  8.6M

56788                       56.8K

Currenlty I can use only {V:#,}k. I am not sure how to use it conditionally. My values are varying for every merhchant and I need to use something conditioannly to take care of the vaues.

Labels (2)
12 Replies
Frank_S
Support
Support

Updated:

I found this but haven't tested it.

https://stackoverflow.com/questions/11731996/string-format-numbers-thousands-123k-millions-123m-bill...

The most success I've had is using formatting for K only using the following custom format in MS Excel:

#,K

See image below:

custom format.PNG

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Frank_S
Support
Support

#,K 

Also works as a custom currency format as well in PxP.

custom format excel.PNG

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
1302aman
Contributor
Contributor
Author

This will conver only in thousand but I need to convert it conditionally like if number is greater than 1000 then convert it in K else no conversion. Also if grrater than 1000000  then convert in Million. 

Frank_S
Support
Support

There is a scripting tool that may help you to achieve this formatting requirement.

Perhaps you could check  the Dev Express knowledge base as this appears to be an advanced scripting function that 'might' be possible. I've placed a couple links here for you. (Dev Express is the platform backbone that PxP is built on.

https://search.devexpress.com/?m=Documentation&f=0&q=format%20Billions%20or%20millions%20or%20thousa...

https://js.devexpress.com/Documentation/ApiReference/Common/Object_Structures/format/

Or perhaps someone else here in the NP community might have a more specific solution as well.

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
1302aman
Contributor
Contributor
Author

I wish i could use this but unfortunately nprint does not allow this else this could be achive easily. My problem is specific to Nprint pixel perfect report. 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

My approach would be to configure another column in source table in Qlik to indicate wheter you need to use M, K or any other format and at the same time already in Qlik devide numbers by 1000000,1000 or whatever you need.. Then in nprinting pixel perfect you can use formatting rules to conditionally (based on additional column i mentioned above) assign number format.

So this is achievable, but requires proper planning on both ends - QlikView / Qlik Sense and Nprinting

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.
1302aman
Contributor
Contributor
Author

I also though the same but I need to Identify those with 'K' or 'M'. Now second challenge is that NetPrinting does not accept values in string and again I need to change them in Number and rounded back to the same issue.  See screen shot below. I need to handle it from Nprint in the same way we do in any app like Qliksense or excel.

 
 

Untitled.png

Currently I have set it up in the Thousands but few if my merchants have in Millions and few of them are in Thousands and I want it to behave dynamically instead of showing only in thousands. 

Untitled.png

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi... this is not what i meant

1 extra column needs to know if it is M K B or anything else (without actual value). This column will be used in Pixel perfect to format column where values already divided by 1000000, 1000, etc (but without format, so still numbers would be shown)

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

so in qliksense you would have following table:

2020-01-09_22-01-50.png

you would use Value for NPrinitng column to produce values in NPrinitng Pixel Perfect template and based on Conditional format you woul add M B K formats or any other format you need

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.