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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Narukkp
Helper V
Helper V

Calculate percentage based on LOB subtotals

How to calculate percentages based on LOB sub totals instead of overall totals. Below is an example table that includes bucket-wise and LOB-wise total counts.

I would like to achieve the following:

  1. Repeat the LOB sub totals for each row.
  2. Calculate the percentage based on the formula: (Total Count / LOB Sub Totals).
  3. Ensure that the LOB sub totals dynamically update when other filters such as location, year, and type are applied.

    If any one having idea please let me know. I have already created measure like LOB Total count= Calculate(Total Count, Allexpect(Table,Table[LOB])) but this is not filtering when i am selecting other filters like location, year, type..

 

Bucket

LOB

Total Count

LOB Total Count

Percentage

-120 - -90

Commercial

10

100

10.0%

-90 - -60

Commercial

50

100

50.00%

-60 - -30

Commercial

5

100

5.00%

-30 - 0

Commercial

8

100

8.00%

0 - 30

Commercial

20

100

20.00%

30 - 60

Commercial

3

100

3.00%

90 - 120

Commercial

4

100

4.00%

-60 - -30

Industrial

100

1200

8.33%

-30 - 0

Industrial

200

1200

16.67%

0 - 30

Industrial

50

1200

4.17%

30 - 60

Industrial

150

1200

12.50%

90 - 120

Industrial

300

1200

25.00%

>120

Industrial

400

1200

33.33%

 

1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @Narukkp,

 

Can you please try this approach:

% of LOB = 
DIVIDE(
    SUM(YourTable[Total Count]),
    CALCULATE(
        SUM(YourTable[Total Count]),
        REMOVEFILTERS(YourTable[Bucket])
    )
)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hi @Narukkp,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-ssriganesh
Community Support
Community Support

Hi @Narukkp,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-ssriganesh
Community Support
Community Support

Hi @Narukkp,

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @Sahir_Maharaj for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solution? If so, please mark it as the solution. This will help other community members solve similar problems faster.

Thank you.

Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

Calculate([Total Count],All(Table[Bucket]))

If it does not, then share the download link of the PBI file.  Show the problem there clearly.


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

Hello @Narukkp,

 

Can you please try this approach:

% of LOB = 
DIVIDE(
    SUM(YourTable[Total Count]),
    CALCULATE(
        SUM(YourTable[Total Count]),
        REMOVEFILTERS(YourTable[Bucket])
    )
)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.