diff --git a/src/converthypercube.js b/src/converthypercube.js index 328526e..51955f3 100644 --- a/src/converthypercube.js +++ b/src/converthypercube.js @@ -73,7 +73,7 @@ class ConvertHypercube { qMax: max, //mesInfo.qMax, qMin: min, //mesInfo.qMin, qSortIndicator: mesInfo.qSortIndicator, - qNumFormat: { + qNumFormat: mesInfo.qNumFormat && { qDec: mesInfo.qNumFormat.qDec, qFmt: mesInfo.qNumFormat.qFmt, qThou: mesInfo.qNumFormat.qThou, diff --git a/src/dataset.js b/src/dataset.js index c0f7368..17473f0 100644 --- a/src/dataset.js +++ b/src/dataset.js @@ -24,7 +24,7 @@ export async function initVarianceCube(component, layout) { const measures = hyperCubeDef.qMeasures; let expression; - if (JSON.stringify(measures[0].qDef.qNumFormat) === JSON.stringify(measures[1].qDef.qNumFormat)) { + if (JSON.stringify(measures[0].qDef.qNumFormat) === JSON.stringify(measures[1].qDef.qNumFormat) && measures[0].qDef.qNumFormat) { let formatter; switch (measures[0].qDef.qNumFormat.qType) { case "D":