The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I need to calculate the % of top 1 over the total.
How can i craetea a measure?
Thank you,
Clara
Solved! Go to Solution.
Hi, thank you. I resolved with
Rank:
Offenders Rank_amt_ytd = RANKX(all('Top Offenders'[Employee Name]),[Offenders_SP_amt_YTD])
Hi, thank you. I resolved with
Rank:
Offenders Rank_amt_ytd = RANKX(all('Top Offenders'[Employee Name]),[Offenders_SP_amt_YTD])
Hi @Anonymous ,
The test data sheet name is 'Table':
You can use the following DAX to create a measure:
%_Top1_Total =
VAR TotalSum = SUMX('Table','Table'[data])
VAR Top1 = MAX('Table'[data])
RETURN
DIVIDE(Top1, TotalSum) * 100
And the final output is shown in the following figure:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Would this help?
Measure = DIVIDE( MAX( 'Table'[Amt] ), SUM( 'Table'[Amt] ) )
hi, @Anonymous
@Anonymous
try below
Measure =
SUM('Table (2)'[Column2])/SUMX(ALL('Table (2)'),'Table (2)'[Column2])
see below image
change basic filter to TOPN
or you can use below measure also
just adjust your table and column name
Measure 2 =
var a = CALCULATE(SUM('Table (2)'[Column2]),ALL('Table (2)'))
var b =CALCULATE(max('Table (2)'[Column2]),ALL('Table (2)'))
var c =
CALCULATE(
DIVIDE(
SUM('Table (2)'[Column2]),
a
),
FILTER('Table (2)','Table (2)'[Column2]=b)
)
return c
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
79 | |
79 | |
44 | |
38 |
User | Count |
---|---|
157 | |
113 | |
64 | |
60 | |
55 |