Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the column "Total", I have a calculated measure, given by the following expression:
Count(DISTINCT {
<
origemEventoAtencao = {'1', '2', '3'},
tipoInternacao = {'1','2','3','4','5'},
regimeInternacao = {'1', '2'},
guiaSolicitacaoInternacao = {"*"},
dataRealizacao = {
">=$(=Date(AddMonths(Max(dataCalendario), -12)))<=$(=Date(Max(dataCalendario)))"
}
>
} guiaSolicitacaoInternacao)
+
Count(DISTINCT {
<
diariasUTI = {">0"},
guiaSolicitacaoInternacao = {"*"},
dataRealizacao = {
">=$(=Date(AddMonths(Max(dataCalendario), -12)))<=$(=Date(Max(dataCalendario)))"
}
>
} guiaSolicitacaoInternacao)
In the column "Contribuição individual", the expression is a simple ratio, being the expression above divided by the sum of all values of "Total".
My problem is to calculate the cumulative percentage. From the example, the values of "Percentual acumulado" must be presented as shown in the figure below
I have already tried using the above, range sum and row functions, however, none of them generated the cumulative sum, and it also messed up the order of the rows.
If it helps, the rows are sorted like this:
Hi, usually to cummulative value could be calculated as: RangeSum(Above([ExpressionToAccumulate],0,Rowno(TOTAL)))
Or, if the table has more than one dimension:
RangeSum(Above(TOTAL [ExpressionToAccumulate],0,Rowno(TOTAL)))