Get Free Trial
Get Free Trial

Number Format issues

Kiran Pasham asked on April 6, 2019

Hi Team,
 
We have couple of emergency issues with regards to pivot to be resolved. Please provide suggestions or resolutions ASAP
 
1. Number format issues: If the column has the number format defined in , then the  pivot output is causing multiple issues based on the column position.

  1. Showing one column data for another column
  2. Showing incomplete data
  3. Calculations are wrong.

 
Input itself contains number format(10,000.00 OR 10.000,00 )  then based on data it appends comma (,) which  pivot is treating as 2 columns as comma is delimiter for the  pivot API which is causing either column shift or improper calculations.
 
2. Currency issues: Default currency symbol is coming as $. Can we remove it? WE can specify currency symbol explicitly whenever needed.
 
 

2 answers

Public
Kiran Pasham April 9, 2019

Any update on this please?

Public
Vera Didenko Flexmonster April 10, 2019

Hello, Kiran,

Thank you for writing to us.
 

1) About number format issues:
 
We kindly advise passing raw (not preformatted) data to Flexmonster Compressor. 

Please note that raw number data can be formatted on the client side in Flexmonster via the thousandsSeparator and decimalSeparator option in the formats parameter.
This can be achieved the following way:


"formats": [
{
"name": "2sfou03a",

/* SET DESIRED SEPARATOR FOR THOUSANDS */
"thousandsSeparator": ",",

/* SET DESIRED SEPARATOR FOR DECIMALS */
"decimalSeparator": ".",

"decimalPlaces": 2,
"currencySymbol": "$",
"positiveCurrencyFormat": "$1",
"nullValue": "",
"textAlign": "right",
"isPercent": false
}
]

We have prepared a few JSFiddle examples for illustration:
 
a) In this JSFiddle example, it is shown how the number format can be predefined in Flexmonster via the formats parameter.
b) In this JSFiddle example, you can see how the number format can be changed during runtime.
 
Could you please provide us with the following information:
Is the data is manually formatted this way (for example 10,000.00 OR 10.000,00) before being passed to the compressor or is it fetched from the data source in such format?
 
Please let us know if passing raw data would work for you.
 

2) About the currency issues:
 
We tried to reproduce the problem you described, but everything worked fine on our side.
In Flexmonster, if no data types are defined, Flexmonster detects certain data types (for example, numbers) automatically and displays the data in the corresponding format. 
 
In this JSFiddle you can see that the “Sum of Revenue” column cells are of currency format as preconfigured, but the “Sum of Quantity” column cell values are detected as number data types and remain as numbers (don’t switch to currency format).

In this JSFiddle no data types where specified and you can see that the “Total Sum of Price” and the “Total Sum of Quantity” column cell values are detected as number data types and remain as numbers (don’t switch to currency format).

Please modify one of the JSFiddles so that the problem is reproducible or provide us with a code sample or a JSFiddle example where the currency issue occurs, so we may be able to help you solve the problem.

We are looking forward to hearing from you.

Best Regards,
Vera

Please login or Register to Submit Answer