Slice rows not supported with its customized format

Answered
Ravi asked on June 17, 2019

Hi Team,
I’m a Premium licensed user.
We have customized the format(left text alignment) and assigned to slice rows.

  • For pivot flat view , It overrides with default format(right text alignment)
  • For pivot compact view, It works.

We are in need to apply slice rows with customized format for both views(flat/compact).

Please refer the following JSFiddle for further clarification.
https://jsfiddle.net/a159oktp/
 

3 answers

Public
Vera Didenko Flexmonster June 18, 2019

Hello, Ravi,
 
Thank you for writing to us.
 
We have modified the JSFiddle example so that the left text alignment is applied for both views(flat/compact):
 
We changed this:

{
"name": "",
...
"textAlign": "right"
}

to this:

{
"name": "",
...
"textAlign": "left"
}

 
Please let us know if this works for your case.
 
We are looking forward to hearing from you.
 
Best Regards,
Vera

Public
Ravi June 19, 2019

Hi Vera,
We are in need of two types of formats as follows:

  1. Dimension format (for slice rows)
    • “textAlign”: “left”
    • “decimalPlaces”: 0
    • “thousandsSeparator”: “”
  2. Default format (for calculated values and formats undefined measures)
    • “textAlign”: “right”
    • “decimalPlaces”: 2
    • “thousandsSeparator”: “,”

We have tried already as you mentioned, it’s not worked as expected.

Please refer the following JSFiddle for further clarification.
https://jsfiddle.net/qme45yr7/11/

Note:
In JSFiddle, we use dimensionDefaultFormat as Dimension format and assigned in slice rows.

Can you let us know any other way to get customized dimension format for both views(flat/compact) of slice rows?

Regards,
Ravi

Public
Vera Didenko Flexmonster June 19, 2019

Hello, Ravi,
 
Thank you for your reply and for providing more details.
 
It helped us a lot to understand your case better.
 
We would like to point out that formatting can be applied only to measures.  
In your case, the specified format is not applied because Column is defined in rows, not in measures and this is why the output for flat and compact/classic forms is different: in compact/classic form by default fields specified in rows are aligned left, whereas in the flat form they are aligned to the right.
 
For this reason, as a workaround, we kindly suggest specifying the fields you would like to apply the dimensionDefaultFormat to in measures as well, for example:

measures: [

{
"uniqueName": "Column",
"aggregation": "sum",
"grandTotalCaption": "Column",
"active": false,
"format": "dimensionDefaultFormat"
}

]

By setting the active property to false, the Column won’t be displayed in measures, but the format will be applied, hence, the desired output will be achieved.
 
Here is a JSFiddle example for illustration.
 
Please let us know if this approach works for you.
 
Best Regards,
Vera

Please login or Register to Submit Answer