Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table with three columns as mentioned below, I have created a Measure to get the percentage Tot Loged Effort and Expected Effort.
I want to create a measure to get the ”Base Service Unit” name based on maximum percentage in “Percentage Logged/Expected" (this is a Measure)“
desire output should be Cloud as it has maximum percentage.
I would like to create a measure.
Base Service Unit | Tot Logged Effort | Expected Effort | Percentage Logged/Expected (Measures) |
Cloud | 16036.85 | 17468 | 92% |
Data | 5708.33 | 6336 | 90% |
Digital | 17221.17 | 19170 | 90% |
Digital-2 | 5579 | 6372 | 88% |
regards,
premm bissht
Solved! Go to Solution.
MAX percentage Base Service Unit =
VAR maxpercentage =
SUMX (
KEEPFILTERS ( TOPN ( 1, ALL ( Data[Base Service Unit] ), [Percentage], DESC ) ),
[Percentage]
)
RETURN
CALCULATE (
SELECTEDVALUE ( Data[Base Service Unit] ),
FILTER ( ALL ( Data[Base Service Unit] ), [Percentage] = maxpercentage )
)
https://www.dropbox.com/s/slxsr4ezftnx3ru/premm.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
thanks JiHwan Kim,
its working fine for me.
Hi,
Can you try the below measure please?
Base Service Unit max =
VAR PercBSU =
ADDCOLUMNS(
ALLSELECTED('Table'[Base Service Unit]),
"@Percentage",[Percentage Logged/Expected]
)
Var MaxPerc =
MAXX(
ALLSELECTED('Table'[Base Service Unit]),
[Percentage Logged/Expected]
)
VAR Result =
CALCULATE(
MAX('Table'[Base Service Unit]),
FILTER(PercBSU, [@Percentage] = MaxPerc)
)
RETURN
Result
I am able to return the correct output.
You can change the ALLSELECTED to VALUES in PercBSU variable to get "Cloud" only showing up on the cloud row.
MAX percentage Base Service Unit =
VAR maxpercentage =
SUMX (
KEEPFILTERS ( TOPN ( 1, ALL ( Data[Base Service Unit] ), [Percentage], DESC ) ),
[Percentage]
)
RETURN
CALCULATE (
SELECTEDVALUE ( Data[Base Service Unit] ),
FILTER ( ALL ( Data[Base Service Unit] ), [Percentage] = maxpercentage )
)
https://www.dropbox.com/s/slxsr4ezftnx3ru/premm.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
User | Count |
---|---|
51 | |
38 | |
20 | |
14 | |
13 |
User | Count |
---|---|
98 | |
71 | |
29 | |
18 | |
13 |