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

Percentage of grand totals and cumulative totals on it.

Hi,

I have a requirement where in I need to calculate percentage of cost by grand totals.

I am able to do this by selecting the value properties and selecting show values as percent of grand totals, But the issues is i need to calculate the cumulative totals of this percentage value.

 

I am unable to figure it out how to create a measure which will calculate percentage of the grand totals and then how to calculate cumulative totals .

 

As we can see in the table I am unable to calculate Cumulative totals.

Can Anyone please help.

UnitItemQuantity%GT QuantityCumulative Percent
122251123500029.41%29.41%
122252135460027.05%56.46%
585561254350020.58%77.05%
458961005200011.76%88.80%
458966589190011.17%99.97%
Total 17000100% 

 

 

Thanks 

Waseem

12 REPLIES 12
parry2k
Super User
Super User

@Anonymous what would be the sort order for cummulative total, is it unit?

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Anonymous add following measures ,  change table and column name as per your data model and change the format for % Measure and % Cumm Total  to Percentage

 

On table visual, put Unit, Item and following measures and you will have the result.

 

Sum of Quantity = SUM ( 'Table (2)'[Quantity] ) 

% Measure = DIVIDE ( [Sum of Quantity], CALCULATE( [Sum of Quantity], ALL() ) ) 

% Cumm Total = CALCULATE( [% Measure], FILTER ( ALL ( 'Table (2)'[Unit], 'Table (2)'[Item]  ), 'Table (2)'[Unit] <= MAX ( 'Table (2)'[Unit] ) ) ) 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k , Thanks, It did worked.

In Cumulative totals I want to have totals, which should be sorted by Unit,Item, and Company filters,

I am trying with this DAX but it is not working,

 

% Cumulative Total = Calculate( [%Measure], Filter(Allselected( Table1(Item), Table1(Item)<=Max(Table1(Item)),Filter(Allselected( Table1(Branch), Table1(Branch)<=Max(Table1(Branch)),Filter(Allselected( Table1(Company), Table1(Company)<=Max(Table1(Company)))

 

Can you please help me with this.

 

Thanks

Waseem

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi,

 

As we can see in the .pbix file, I have Branch, Item, Sum Item Wise(Sum of quantity item wise sorted in descending order), Here I have calculated contribution measure which is the value to the percentage of Sum item wise to the grand totals, 

I want to have a cumulative totals of the Measure Contribution which should be dynamic, when i change filter of item and branch it should calcuate and display the cumulative totals.

 

I have created a measure as rolling contribution but it doesn't give the required results.

 

https://drive.google.com/file/d/1dxwmA-6bKscJiZZKWDGZwmTgErbDnqWA/view?usp=sharing

 

Thanks

Wasem

Anonymous
Not applicable

I want to have sum by item wise, But anyhow if I am able to do the cumulative of contribtution only on Quantity bases, in descending order , Where my item and business unit filter will work dynamially , That is fine.

 

ItemBusiness UnitQuantityContributionCumulative
121179256010041000010.176340.17634
120899256010041000000.1763390.352679
120952256010041000000.1763390.529017
13638825601004964200.1700260.699043
12805225601004765600.1350050.834048
11934425601004270800.0477520.8818
13527225601004135060.0238160.905617
11846225601004100000.0176340.92325
1184632560100488900.0156760.938927
1208892560100458580.010330.949257
1208672560100442910.0075670.956824
94442560100424000.0042320.961056
1215752560100424000.0042320.965288

 

Thanks

 

Hi,

Based on this table that you have pasted, please show the exact expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

Why have you created a Table 2 calculated table?  Why not build your visual from Table1 itself?  In Table1, what is the purpose of creating "Sum Itme Wise" column?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Anonymous,

AFAIK, calculate function use 'AND' logic to link all filters. Your formula can only get the wrong result for multiple range filter effects.

For your requirement, I'd like to suggest you take a look at the following link to add a rank field of multiple columns based on ISONORAFTER function, then you can use this field as the index to calculate the rolling total.

Sorting by multiple columns 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@Anonymous may be concatenate these 3 fields and then use that field for your cumulative total.  If still doesn't work, share the pbix file and remove sensitive info befoe sharing.

 

Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k , Thanks for your quick response, 

I want to see % measure chaning as per item, unit and I have company column as well, Measure is working fine when I see it in table visual withput any filters, but when i try to put a slicer of unit, item and company it is not working dynamically.

 

Thanks.

waseem

 

 

@Anonymous instead of ALL user ALLSELECTED

 

Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.