Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi I need help with creating two measures to calculate employee bonuses.
I have such a report and I would like to calculate two measures in the lower table:
The first measure "Percentage of orders from category 1" - it is supposed to tell what percentage of all orders of a given employee are orders from category 1
The second measure: "Bonus" - for each order, if for a given agent, the percentage of orders from the first category is greater than 50%, then the bonus for the order is 20, and if it is below, 10
Here is what the result table should look like:
Order ID | order_date | seller | category | Percentage of orders from category 1 | Bouns |
1 | 01.07.2023 | A | cattergory 1 | 25% | 10 |
2 | 01.07.2023 | A | cattergory 2 | 25% | 10 |
3 | 04.07.2023 | B | cattergory 1 | 100% | 20 |
4 | 05.07.2023 | C | cattergory 2 | 0% | 10 |
5 | 07.07.2023 | B | cattergory 1 | 100% | 20 |
6 | 07.07.2023 | A | cattergory 2 | 25% | 10 |
Source data:
Order ID | order_date | seller | category |
1 | 01.07.2023 | A | cattergory 1 |
2 | 01.07.2023 | A | cattergory 2 |
3 | 04.07.2023 | B | cattergory 1 |
4 | 05.07.2023 | C | cattergory 2 |
5 | 07.07.2023 | B | cattergory 1 |
6 | 07.07.2023 | A | cattergory 2 |
7 | 08.07.2023 | C | cattergory 1 |
8 | 15.08.2023 | C | cattergory 2 |
9 | 16.08.2023 | C | cattergory 1 |
10 | 17.08.2023 | C | cattergory 2 |
please provide with more explaiantion this is not clear of what you want how is your percentage calculated? how is your orders calculated?
this is what i got but different from your reults
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |