Forum Discussion
Imam01
2 years agoNew Member
How to Calculate Cumulative Percentage
I am trying to calculate a cumulative percentage i.e. row 1 will be 2.76% and row 2 will be 5.34% etc. % of Trips with Blank Driver is a measure and does not belong to a table. All other columns belo...
Anonymous
2 years agoNot applicable
Hi Imam01
As Greg_Deckler mentioned, you just need to change the [Index] to your own meaure /column name, and you can try the following measure.
If your fields are in the same table, you can try this.
Measure =
VAR a =
ADDCOLUMNS (
ALLSELECTED ( 'Vehicle' ),
"Rank", [Top 10 Blank ID Vehicles Ranking],
"%Trips", [% of Trips with Blank Driver]
)
VAR b = [Top 10 Blank ID Vehicles Ranking]
RETURN
SUMX (
FILTER (
a,
[Vehicle License Plate]
IN VALUES ( 'Vehicle'[Vehicle License Plate] )
&& [Rank] <= b
),
[%Trips]
)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.