Forum Discussion
Calculated value using Pareto principle
- Anonymous6 years ago
Hi Ville,
Firstly you would need a ranking column. The simplest would be to do this in your query editor since it is a built in function (Add column/Index column). Rank your Sales column in descending order when doing this.
Create a measure
mCumulativePerc = VAR vTotal = CALCULATE( SUM('Table'[Sales]), ALLSELECTED('Table') ) VAR vCumulativeSum = CALCULATE( SUM('Table'[Sales]), FILTER( ALLSELECTED('Sales'), 'Table'[Index] <= MAX('Table'[Index]) ) ) VAR vCumulativePerc = DIVIDE( vCumulativeSum, vTotal ) RETURN vCumulativePercAnd call it in a calculated column
Cumulative Percentage = [mCumulativePerc]As for only looking at a certain range, you can use a slicer and use the calculated column as your field.
Hope you found this useful
Regards,
AndreM
Hi Ville,
Firstly you would need a ranking column. The simplest would be to do this in your query editor since it is a built in function (Add column/Index column). Rank your Sales column in descending order when doing this.
Create a measure
mCumulativePerc =
VAR vTotal =
CALCULATE(
SUM('Table'[Sales]),
ALLSELECTED('Table')
)
VAR vCumulativeSum =
CALCULATE(
SUM('Table'[Sales]),
FILTER(
ALLSELECTED('Sales'),
'Table'[Index] <= MAX('Table'[Index])
)
)
VAR vCumulativePerc =
DIVIDE(
vCumulativeSum,
vTotal
)
RETURN
vCumulativePerc
And call it in a calculated column
Cumulative Percentage = [mCumulativePerc]
As for only looking at a certain range, you can use a slicer and use the calculated column as your field.
Hope you found this useful
Regards,
AndreM