Download Free Trial

Cannot compute average

I have some measures in my pivot table, and when clicking on the small “Sigma” on the right of the measure’s name, I can choose between several types of aggregations: Sum, Count, Average, etc.
However, when I add another column to the box (Delay_in_days), its name is displayed, but the “Sigma” will only show “Count” and “DistinctCount”, and I need to compute an average on that column. The only difference I see is that the new column has zeroes in it.
Of course, I need those zeroes to be computed into the average calculation, because a delay of zero days lowers the average

3 answers

Iryna Kulchytska Flexmonster June 8, 2017

Hi Alberto,
Thank you for your question.
Only “Count” and “DistinctCount” aggregations are available for columns that contain string data. If your Delay_in_days column contains numeric data you can set its type for the component explicitly in CSV or JSON. More details on how to define the data type explicitly can be found in the articles Data types in CSV and Data types in JSON respectively.
For example, in CSV you need to add prefix ‘-‘ to the column name in the header row of CSV, as follows:


Please let me know if setting the data type explicitly works for you.
Kind regards,

Alberto Nudman June 8, 2017

Dear Iryna,
My data is loaded in SQL Server. Therefore, making the source table define the data type as INT  (i.e, SELECT CAST(number_of_days AS INT) AS number_of_days, did the trick
Id there a way to limit the number of decimals shown in the table?
Many thanks!

Alberto Nudman June 8, 2017

I managed to limit the number of decimals in the average with

             formats: [{
                name: “TwoDecimals”,
                decimalPlaces: 2
And then…
{ uniqueName: “[dias_primer_contacto]”, “aggregation”: “average”, “format”: “TwoDecimals”}
Thanks for helping me out of this. Flexmonster is just too cool.

Please login or Register to Submit Answer