Get Free Trial

dimension field is showing grand total

Answered
Ravi asked on August 1, 2022

Hi Team,
 
How to prevent grand total calculation for string fields(dimension field) on pivot flat type. find the link bellow.
https://jsfiddle.net/Karthickc/g8hjecyo/7/
 
Thanks and regards
Karthick

3 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster August 1, 2022

Hello, Karthick!

Thank you for your question.

The grand total is calculated for strings with numbers because, by default, fields containing numbers are parsed as numbers during type resolution. We suggest explicitly assigning the "string" type for string fields (that contain numbers) inside the MappingObject:

mapping: {
  name: {
    type: "string"
  }
}

Please see this JSFiddle for reference.

Alternatively, you can disable all grand totals with the showGrandTotals: "off" option. You are welcome to check the example.

Hope you will find this information helpful. Feel free to contact us if further assistance is needed.

Best Regards,
Maksym

Public
Ravi August 2, 2022

Hi Maksym,
Is there any configuration for me to avoid the grand total only for the dimension field(even an integer field) instead of turning it off for all?
 

Public
Maksym Diachenko Maksym Diachenko Flexmonster August 2, 2022

Hi, Ravi!

Currently, there are no configurations allowing you to disable grand totals for specific numeric fields.
We have added this feature to our customer’s wishlist and will notify you in case of any progress.

Best Regards,
Maksym

Please login or Register to Submit Answer