Using PercentDifferenceFromPrevious function within a CalculatedAggregateDescription based on a calculated field has unwanted side effects

2 Answers 60 Views
PivotGrid
Chris
Top achievements
Rank 1
Iron
Chris asked on 09 Feb 2023, 09:45 AM | edited on 09 Feb 2023, 11:59 AM

Hi all,

I´ve attached a screenshot of a behaviour within the PivotGrid I do not understand. When adding a calculated field making use of the TotalFormat "PercentDifferenceFromPrevious", the underlying column used for the calculation is formatted as percentage value? How can I overcome this issue? Changing the NumberFormat within the PropertyAggregateDescription for "Sum of Sensitivity" does not have an effect.

 

EDIT: Placing the calculated field "%-Diff. Sensitivity" before the "Sum of Sensitivity" field using Drag&Drop on the values field of the PivotFieldList eliminates this bug. I can also set the number format of "Sum of Sensitivity" then as I wish to.

Could you suggest a walkaround for me?

Regards,

Chris

Vladimir Stoyanov
Telerik team
commented on 13 Feb 2023, 03:03 PM

May I ask you to share a sample project demonstrating the observed on your end behavior? Note, that you can use the LocalDataSourceCalculatedFields RadPivotGrid SDK example as a startup point, if you find that more convenient. 

This will hopefully allow me to investigate the exact scenario and further assist you.

2 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 14 Feb 2023, 04:14 PM

Hello Chris,

Thank you very much for the shared project and additional steps. 

I was able to replicate the described behavior on my end and I have logged it in our feedback portal: PivotGrid: String formats can be mixed when adding a calculated field along with its required field as aggregate values, where you can track its progress. I have also added some telerik points to your account as a thank you for your involvement. 

For the time being, as a workaround, you can create a new AggregateValue instance in the CalculateValue override of the custom field and copy the properties of the original instance. I am attaching the sample project back modified to demonstrate what I have in mind. Note, that I have added this logic in the PercentDiffCalculatedField, however you can transfer it to other calculated fields as well.  

Regards,
Vladimir Stoyanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Chris
Top achievements
Rank 1
Iron
commented on 14 Feb 2023, 04:40 PM

Hi Vladimir,

thanks a lot, that helped. The data is displayed correctly now :-)

As a sidenote: The export function of the PivotGrid is also affected by the bug. Columns are exported incorrectly as percentage values. That was actually the issue that brought me to this point.

Regards,

Chris

 

Vladimir Stoyanov
Telerik team
commented on 15 Feb 2023, 02:37 PM

I am glad to hear that you found the suggested approach helpful. 

Thank you for the additional info. I will update our internal item with it. 

0
Chris
Top achievements
Rank 1
Iron
answered on 14 Feb 2023, 07:50 AM

Hi Vladimir!

I wasn´t aware of the support tickets option - thanks for pointing that out :-)

I´ve attached a screenshot and an example program reproducting the error I stated. Could you please have a look at that?

Thanks in advance,

Chris

Tags
PivotGrid
Asked by
Chris
Top achievements
Rank 1
Iron
Answers by
Vladimir Stoyanov
Telerik team
Chris
Top achievements
Rank 1
Iron
Share this question
or