Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Top 1 % of the total

Hello,

 

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

 

claraigg_0-1699385938999.png

 

 

How  can i craetea a measure?

 

Thank you,

 

Clara

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, thank you. I resolved with

Rank:

 

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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi, thank you. I resolved with

Rank:

 

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

v-junyant-msft
Community Support
Community Support

Hi @Anonymous ,

The test data sheet name is 'Table':

vjunyantmsft_0-1699426943611.png

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:

vjunyantmsft_1-1699427006503.png

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.

 




gmsamborn
Super User
Super User

Hi @Anonymous 

Would this help?

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


Proud to be a Super User!

daxformatter.com makes life EASIER!
Dangar332
Super User
Super User

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

Dangar332_0-1699388393001.png

 

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

 

Dangar332_0-1699432195834.png

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.