Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |