Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone, I am stuck in a scenario.
I have made a table visual with Employee Name(Which is a column from a table) and Utilization Rate(which is a calculated measure). As given below :
Employee Name | Utilization Rate |
a | 100.00% |
b | 100.00% |
c | 100.00% |
c | 0.00% |
d | 35.71% |
e | 0.00% |
e | 0.00% |
e | 0.00% |
f | 72.62% |
f | 70.24% |
g | 100.00% |
From this table visual I want to remove the duplicated employee names. I want to keep only those rows with the highest Utilization Rate as shown below :
Employee Name | Utilization Rate |
a | 100.00% |
b | 100.00% |
c | 100.00% |
d | 35.71% |
e | 0.00% |
f | 72.62% |
g | 100.00% |
Here I want to remove the rows in red colour. As shown in the immage below :
Can anyone help me solve this problem?
Solved! Go to Solution.
HI @Anonymous,
You can try to use the following measure to get the max Utilization Rate based on the current employee group:
Measure =
VAR cEName =
VALUES ( 'Table'[Employee Name] )
RETURN
MAXX (
FILTER (
SUMMARIZE (
'Table',
'Table'[Employee Name],
"mURate", MAX ( 'Table'[Utilization Rate] )
),
[Employee Name] IN cEName
),
[mURate]
)
Regards,
Xiaoxin Sheng
You even don't need an explicit measure to achieve this,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @CNENFRNL thanks for your input
But since Uilization Rate is a measure I'm not getting these options.
Regards,
Aditya
@Anonymous You can create a calculated table as:
HI @Anonymous,
You can try to use the following measure to get the max Utilization Rate based on the current employee group:
Measure =
VAR cEName =
VALUES ( 'Table'[Employee Name] )
RETURN
MAXX (
FILTER (
SUMMARIZE (
'Table',
'Table'[Employee Name],
"mURate", MAX ( 'Table'[Utilization Rate] )
),
[Employee Name] IN cEName
),
[mURate]
)
Regards,
Xiaoxin Sheng
Hi @BeaBF ,
since Utilization Rate is a measure,
I'm not getting the option to aggregate it.
Anyways, thanks for your input.
Aditya
@Anonymous can you paste the code of that measure?
BF
Hi @Anonymous , we would need more details about the Data Model and DAX Measures to provide a clear solution. It is likely that Many to One or equivalent is causing the issue. But I am wondering if you have the following situation occuring. How to show a name more than once in Power BI - YouTube
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |