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

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.

Reply
Anonymous
Not applicable

75th percentile based off measure or distinctrows

Hi everyone,

 

I have a dataset with 17,000 rows. I am trying to calculate the 75th percentile for the amount of hours it took. The only issue is I do not want it based off the entire column as there are duplicate hours.

Quote                                                                        Hours

NewPlsHelp_1-1627305977838.png

 

If I calculated the 75th percentile based off the small sample above, it would return the value using all of the hours above.

I have a measure that adds up the total amount of hours per each quote written here: 

Total Hours = VAR MyTempTable =
    ADDCOLUMNS(
        SUMMARIZE('FY2021 WW3 Quote Status', 'FY2021 WW3 Quote Status'[ Quote],'FY2021 WW3 Quote Status'[Hours Num]),
        "DistinctValue", CALCULATE(MAX('FY2021 WW3 Quote Status'[Hours Num]))
    )
    return 
    SUMX( MyTempTable, [DistinctValue])

The picture below is how I want the 75th percentile to be calulated.

Quote                                                                        Hours

NewPlsHelp_2-1627306300590.png

I am not sure how to go about calculating the 75th percentile for the above picture. 

 

I hope this makes sense and any input would be super helpful!

 

Thank you!

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

You should be able to use an expression like this.

 

Pct75 Distinct = PERCENTILEX.EXC(SUMMARIZE(Hours, Hours[Quote], Hours[Hours]), Hours[Hours], 0.75)
 
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Employee
Employee

You should be able to use an expression like this.

 

Pct75 Distinct = PERCENTILEX.EXC(SUMMARIZE(Hours, Hours[Quote], Hours[Hours]), Hours[Hours], 0.75)
 
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

bump

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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