/// <summary>
        /// Computes AnalysisXResultCell aggregated results
        /// </summary>
        /// <param name="lstAnalysis">
        /// List of <see cref="AnalysisProcessingResultColumnValue"/>
        /// </param>
        /// <param name="aggregationType">
        /// <see cref="AnalysisAggregationType"/> object
        /// </param>
        /// <param name="column">
        /// <see cref="AnalysisColumn"/> object.
        /// </param>
        /// <returns>
        /// List of <see cref="AnalysisXResultCell"/>
        /// </returns>
        private static List <AnalysisXResultCell> GetAnalysisXResultCells(
            List <AnalysisProcessingResultColumnValue> lstAnalysis,
            AnalysisAggregationType aggregationType,
            AnalysisColumn column)
        {
            var xResultCells    = new List <AnalysisXResultCell>();
            var xCategoryValues = column.XCategoryValues;

            foreach (var xCategoryValue in xCategoryValues)
            {
                var result = 0.0;
                if (aggregationType.Sum)
                {
                    result = lstAnalysis?.Sum(x => x.ResultForXCategoryValueKey(xCategoryValue.Key)) ?? result;
                }
                else if (aggregationType.Min)
                {
                    if (lstAnalysis?.Any() == true)
                    {
                        result = lstAnalysis.Min(x => x.ResultForXCategoryValueKey(xCategoryValue.Key));
                    }
                }
                else if (aggregationType.Max)
                {
                    result = lstAnalysis?.Max(x => x.ResultForXCategoryValueKey(xCategoryValue.Key)) ?? result;
                }
                else
                {
                    var count        = 0;
                    var currentCount = 0;
                    if (lstAnalysis?.Any() == true)
                    {
                        foreach (var colVal in lstAnalysis)
                        {
                            currentCount = colVal.CountForXCategoryValueKey(xCategoryValue.Key);
                            if (currentCount > 0)
                            {
                                result += colVal.ResultForXCategoryValueKey(xCategoryValue.Key) * currentCount;
                                count  += currentCount;
                            }
                        }
                    }

                    result = count > 0
                        ? result / count
                        : 0;
                }

                xResultCells.Add(new AnalysisXResultCell(result, column.ResultColumn.DisplayStringFromNumber(result)));
            }

            return(xResultCells);
        }
        /// <summary>
        /// Returns aggregated result from list basing on aggregationType
        /// </summary>
        /// <param name="aggregationType">
        /// <see cref="AnalysisAggregationType"/> object
        /// </param>
        /// <param name="lstAnalysis">
        /// List of <see cref="AnalysisProcessingResultColumnValue"/>
        /// </param>
        /// <returns>Aggregated Value</returns>
        private static double GetAggregatedResult(AnalysisAggregationType aggregationType, List <AnalysisProcessingResultColumnValue> lstAnalysis)
        {
            var result = 0.0;

            if (aggregationType.Sum)
            {
                result = lstAnalysis.Sum(x => x.Result);
            }
            else if (aggregationType.Min)
            {
                result = lstAnalysis.Min(x => x.Result);
            }
            else if (aggregationType.Max)
            {
                result = lstAnalysis.Max(x => x.Result);
            }
            else if (aggregationType.StaticAggregator)
            {
                result = lstAnalysis[0]?.Result ?? result;
            }
            else
            {
                var count = 0;
                foreach (var colVal in lstAnalysis)
                {
                    result += colVal.Result * colVal.Count;
                    count  += colVal.Count;
                }

                result = count > 0
                    ? result / count
                    : 0;
            }

            return(result);
        }