Forum Discussion
Anonymous
4 years agoNot applicable
Cummulative sum in a column
Hi, 1) I have Grand Total column as below, from that i need to get % column value listed below. Grand Total 656,306 to get 30% i need to do 197,829/656,306 = 30% to get 13% i need to do 84,635/6...
Jihwan_Kim
Super User
4 years agoHi,
I cannot know the column name in your visualization that is placed in the left side of it.
Please try something like below.
Cumulate percentage measure: =
VAR _percentage = [Percentage measure:]
VAR _cumulate =
SUMX (
FILTER (
ALL ( 'TableName'[somethinglikeindexcolumn] ),
[Percentage measure:] >= _percentage
),
[Percentage measure:]
)
RETURN
_cumulate
Anonymous
4 years agoNot applicable
Hi,
I am using the Country in left column of the visual
- Jihwan_Kim4 years ago
Super User
Please try the below whether it suits your requirememt.
Cumulate percentage measure: = VAR _percentage = [Percentage measure:] VAR _cumulate = SUMX ( FILTER ( ALL ( 'TableName'[country] ), [Percentage measure:] >= _percentage ), [Percentage measure:] ) RETURN _cumulate- Anonymous4 years agoNot applicable
When i use country column in the measure i am getting like below cummulative is not coming in correct way. Please see below
Cumulate percentage measure: =VAR _percentage = [Percentage %]VAR _cumulate =SUMX (FILTER (ALL ( 'DB 15092022_1'[country]),[Percentage %] >= _percentage),[Percentage %])RETURN_cumulate- Jihwan_Kim4 years ago
Super User
Hi,
May I ask, do you want to cumulate by country code alphabetical order? Or, by QTY descending order?
I think the measure is showing cumulate percentage by QTY descending order.