Skip to Content
0
Jul 02 at 11:54 AM

Aggregations are wrongly calculating the Visual filters percentage values

24 Views

Hello Experts,

I'm facing a problem related to Visual filters percentage calculation in my Analytical List App. Below is my Analytical list App with three different charts where i have made Visual filters completed dependent on each other.

1. Line Chart - Total of bank Statements (measures) based on Statement Date(Dimension)

2. Donut Chart - Total of Bank Statements(Measures) on Company code (Dimension)

3. Bar Chart - Reason rate(Measuers) by Reason Code(Dimension)

The values filtered in the bar chart above is shown correctly but we want to show the percentage value. To achieve this i tried to use the formula in my Consumption view

@EndUserText.label: 'Rate %'

@DefaultAggregation: #FORMULA

@AnalyticsDetails.query.formula: 'NDIV0( $projection.TotalWithReason / $projection.TotalItems ) * 100' @AnalyticsDetails.query.decimals: 2 1 as Rate

Where TotalWithReason Is calculated based on Exception Aggregations

@EndUserText.label: 'Total With Reason '

@AnalyticsDetails: {

exceptionAggregationSteps: [ {

exceptionAggregationBehavior: #SUM, exceptionAggregationElements: [ 'BanksStaetementShortID', 'BankStatementItem', 'MainCompanyCode', 'Reason'] } ]}

@AnalyticsDetails.query.formula: 'ReasonCount'

0 as TotalWithReason

and TotalItems as below

@EndUserText.label: 'Total Items' @AnalyticsDetails: { exceptionAggregationSteps: [ { exceptionAggregationBehavior: #SUM,

exceptionAggregationElements: [ 'BankStatementShortID', 'BankStatementItem'] } ]}

@AnalyticsDetails.query.formula: '$projection.TotalOfBankStatements'

@AnalyticsDetails.query.totals: #SHOW

@UI.lineItem.position: 60 0 as TotalItems,

and finally the output is below : In the bar chart we can see the 100% for each reason

This is because in the table we have same number of Total Items or Total Number of bank Statements as Reason. But we want to calculate based on the Total of grouping (Bank Statement Date or Company Code) in the Line or Donut Chart. For example:

as per the 1st Screenshot for Reason 1100 the percentage would have been ( Sum of Reason count) / ( Total of Bank Statements in Line of Donut chart) * 100.

I'm not able to achieve this calculation in my Consumption view through Exception Aggregations. is there any way we can achieve this which look for the total of values in Chart rather table values. So i would like to ask how can we get percentage value in the bar chart specially when other visual filters are selected (in my case Line and Donut chart).

Attachments

yctgy.png (121.4 kB)