cancel
Showing results for
Did you mean:

## Percentage Calculation in Power BI

I need to calculate the percentage based on the number of programs with a "Yes" response and how many are planned or have a "No" response. However, the challenge is that each program consists of multiple service orders, each with its own Service Order Status, which can be "Yes," "No," or "Planned."

Data Example:

 PROGRAM CODE Service Order # Service Order Status ABC1234 IA Planned ABC1234 1B Planned ABC1234 1c Yes ABC1234 2D Yes ABC1238 4A Planned ABC1239 7A Under Assessment ABC1240 2C Under Assessment ABC1241 2F Under Assessment ABC1242 7C No ABC1243 8C No ABC1244 2D Under Assessment ABC1240 4D Under Assessment ABC1240 6D Under Assessment ABC1242 9D Yes ABC1243 1D Under Assessment ABC1242 1H Yes ABC1243 2H Planned ABC1238 3H Under Assessment ABC1239 IJ Yes ABC1238 5J Yes ABC1239 6Y Yes

Here's the tricky part: If a program has a "Yes" response for one service order but a "No" or "Planned" response for another service order under the same program, we should count it as a "Yes" for that program and disregard the other responses.

1. Service Order Status Response = Yes: This counts as a "Yes" for a program.
2. Service Order Status Response = Planned: This only considers unique program numbers without other responses.
3. Service Order Status Response = No: This also only considers unique program numbers without other responses.

The goal is to ensure that when we add up the percentages, it should total 100%. Currently, my results show that the percentage with "Yes" is accurate, but the percentages for the other categories are incorrect.

10 REPLIES 10

can you provide dax code?

I have not use DAX for it, I am using %GT calculation in X Axis to get percentage, but t giving me incorrect one

What would you consider the correct result? How are you handling the "Under Assessment" option?

1. Service Order Status Response = Yes: This counts as a "Yes" for a program.
2. Service Order Status Response = Planned: This only considers unique program numbers without other responses.
3. Service Order Status Response = No: This also only considers unique program numbers without other responses.
4. Service Order Status Response = Under Assesment: This also only considers unique program numbers without other responses.

The total percentage for all respnses should ne equal to 100%

You are only restating part of your original post and not providing any percentages.

How does that indicate your expected results? I thought the expected results would be a percentage for each status. But you don't show how they are derived.

What if a program has, for example, status responses of "No", "Planned" and "Under Assessment" for the different Service Order #'s?

You really need to be more specific. I cannot figure out, for example, how you derive 81% as the correct answer for "Yes".

How do calculate 81% "Yes"

What result would you expect for each of the Planned / Under Assessment / No categories.

In my real data, i have total # number of programs = 45

1. Out of 45  Programs , 37 Service Order Status Response = Yes:
2. Out of 45  Programs , 16 Service Order Status Response = Under Assesment
3. Out of 45  Programs , 3 Service Order Status Response = Planned

And if you take a percentahe then you will get the Chart I shared with you, In some senarios I have no so need to keep one sanario for it too

Also I have total # of programs are 45 , and if Yes are 37 then left over that should 45-37= *, Only 8 program should be in Planned or under assesmet status, and that what I am trying to figure our how to calculate thos correctly that the prog that are already have yes ststus should not be count again for other status

Providing results from data you have not posted is not useful. I'm sorry I cannot help further. Good luck!

Hi @aishaakhter18 ,

Best Regards,
Gao

Community Support Team

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Announcements

#### Tuesday Tip | How to Get Community Support

It's time for another Tuesday Tip, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.       This Week: All About Community Support Whether you're a seasoned community veteran or just getting started, you may need a bit of help from time to time! If you need to share feedback with the Community Engagement team about the community or are looking for ways we can assist you with user groups, events, or something else, Community Support is the place to start.   Community Support is part of every one of our communities, accessible to all our community members.   Within each community's Community Support page, you'll find three distinct areas, each with a different focus to help you when you need support from us most. Power Apps: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pa_community_support Power Automate: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpa_community_support Power Pages: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpp_community_support Copilot Studio: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pva_community-support   Community Support Form If you need more assistance, you can reach out to the Community Team via the Community support form. Choose the type of support you require and fill in the form accordingly. We will respond to you promptly.    Thank you for being an active part of our community. Your contributions make a difference!   Best Regards, The Community Management Team

#### Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp