The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
hi everyone
I have created a measure that calculated the achievement % . I'm trying to create max, min measure for that column for each sales agent and then find the average achievment% for all categories for the agent.
reference to the example below:
from the measure [new achiev%], i want to create maximum achievement measure and return 92% and minimum achievement measure return 61% to return and then the average achievement measure to return 73.19%
what i'm trying to calculate from these measures is the sales agent incentive. the rules for the measure calculation is:
-at least one category has achievment % of 90%
-the achievement in all other 3 categories should be at least 70%
in the example provided, agent won't get his incentive because he achieved 92% in one category and achieved below 70% in other categories.
Hi @lawadaa
assuming that the measures will be used in a separate table visual where you slice by [Sales Agent] then you use
Max New Achievement % =
MAXX (
SUMMARIZE ( 'Table', 'Table'[categories summarize], 'Table'[BASE_TYPE] ),
[new achiev %]
)
You can just replace MAXX with MINX or AVERAGEX to obtain the other measures
this measure only works in a card visual, when i put in in a table visual it returns the same value of [new achiev %] measure
@lawadaa
Actually it depend on what do you have in that table. This is what I was trying to clarify in my answer. For example if you have only [Sales Agent] in the table along with the measure it should work. Otherwise, please advise what do have in the table.
this is what i have in my table:
agent id, agent name, category, base type, and the rest are DAX measures
User | Count |
---|---|
18 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
13 | |
12 | |
9 | |
8 |