Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cumulative of Percentage in DAX

Need to have a DAX formula to create cumulative of percentage, I need the value like highlighted, its doing cumulative of column C as percentage. Please help

pankajkumar27_0-1620384926887.png

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

The main idea is to first create column B, get the value of the previous row, and then use divide to calculate the result of divide (11.29-11.23, 11.23,0). Then find column C according to the calculation in column B. You can refer to the links to similar questions below, the ideas are basically the same.

 

link:Solved: get value from Previous row - Microsoft Power BI Community


If the problem is still not resolved, please provide detailed error information. Let me know the result immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

Hello, I have the same need but the percentage of the total is a calculated measure

% of total = WHERE BEFORE=
SUM(T_VENT_E[USD])
WHERE TOTALPRIMA=
SUMX(
ALLSELECTED(T_VENT_E),
T_VENT_E[USD]
)
RETURN
DIVIDE(BEFORE,TOTALPRIMA)
Now I need to accumulate the percentage of result with another measure, I do not know if it is possible, it helps.
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

The main idea is to first create column B, get the value of the previous row, and then use divide to calculate the result of divide (11.29-11.23, 11.23,0). Then find column C according to the calculation in column B. You can refer to the links to similar questions below, the ideas are basically the same.

 

link:Solved: get value from Previous row - Microsoft Power BI Community


If the problem is still not resolved, please provide detailed error information. Let me know the result immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

thank you for the suggestion, i am not getting any error but the output I need in column D is not coming.

Please take some example and show me how to get this..

amitchandak
Super User
Super User

@Anonymous , if C is a column

calculate(sum(Table[C]), filter(allselected(Table),Table[datetime_date] <=max(Table[datetime_date])))

 

or C is measure

calculate(sumX(values(Table[datetime_date]) ,[C]), filter(allselected(Table),Table[datetime_date] <=max(Table[datetime_date])))

Thank you very much for the information! I was looking at how to make the cumulative % from a measure.

I work perfectly😁

Anonymous
Not applicable

Thanks @amitchandak for your response, I forgot to mentioned that Column C is also a calculated value from column B doing e.g divide(11.29-11.23, 11.23,0) = 0.47% ans so on (this is not actual but this is how its has been derived.)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.