Aggregation is always 'count' when same data is contained in two or more fields

Answered
Yousif Ahmed asked on March 5, 2019

I am trying to create a pivot report using a dataset which contains two text fields and one numeric field called 'Count'. - some items in the data array have the same value for both text fields ('NoMatch'). If I create a report slice with a single measure called "Count", and set the aggregation to 'sum', the resulting pivot seems to ignore this and sets the aggregation to count. I have tried renaming my field and measure to something other than count but this did not help. This only seems to occur when the data contains 'NoMatch' values in both text fields.
I have made a jsfiddle to illustrate the problem, and have attached a JSON example report:
 
https://jsfiddle.net/yahmed/6Lfoed7t/5/
 

Attachments:
report.json

2 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster March 5, 2019

Hello Yousif,
Thank you for writing to us. Such things happen when the data types are not explicitly defined.
Please refer to the following article: https://www.flexmonster.com/doc/managing-data-presentation-json.
Also, here is the jsfiddle example: https://jsfiddle.net/flexmonster/smya6b57/.
Regards,
Dmytro

Public
Yousif Ahmed March 6, 2019

Hi Dmytro,
That's brilliant, works perfectly. Thanks again for your help!
 

Please login or Register to Submit Answer