cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper II

## Top 1 % of the total

Hello,

I need to calculate the % of top 1 over the total.

How  can i craetea a measure?

Thank you,

Clara

1 ACCEPTED SOLUTION
Helper II

Hi, thank you. I resolved with

Rank:

Offenders Rank_amt_ytd = RANKX(all('Top Offenders'[Employee Name]),[Offenders_SP_amt_YTD])

4 REPLIES 4
Helper II

Hi, thank you. I resolved with

Rank:

Offenders Rank_amt_ytd = RANKX(all('Top Offenders'[Employee Name]),[Offenders_SP_amt_YTD])

Community Support

Hi @claraigg ,

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.

Super User

Would this help?

``Measure = DIVIDE( MAX( 'Table'[Amt] ), SUM( 'Table'[Amt] ) )``
Super User

hi, @claraigg

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

``````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``````

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors