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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ApurvaKhatri
Helper III
Helper III

Calculating Percentile on Measure

Hi,

 

I have a measure in my powerbi report. I am trying to calculate the percentile on the measure [UnitsLeased] and table1.

 

However, when I apply the formula, I do not get the option of calculating the percentile for measure. Please help.

11 REPLIES 11
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @ApurvaKhatri,

 

Have you solved your problem?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please share your desired output.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LivioLanzo
Solution Sage
Solution Sage

@ApurvaKhatri Hello,  please share your dataset

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

I wont be able to share the actual dataset. However, the dummy set is:

 

Sales ManagerUnitsLeased 
A2
B5
C7
D9

 

UnitLeased is a measure.

Also, I have a date slicer that has hierarchy of Year- Month

@ApurvaKhatri

 

I won't be able to provide the exact measure without seeing the model. But in general you can do something like this:

 

PERCENTILEX.INC( VALUES(Sales[Sales Manager] ), [UnitsLeased], 0.9 )

 

you will need to adapt this to your needs

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Thanks for the help. But that doesnt work as expected.

@ApurvaKhatri

 

I am not surprised. As I said the measure depends on your matrix and on your model

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Measure formula:

Unit Leased = CALCULATE(DISTINCTCOUNT(view_Report_Sale_SaleManagerOverView[opportunityid]),DATESBETWEEN(view_Report_Sale_SaleManagerOverView[actualclosedate],[firstdate],[lastdate]),view_Report_Sale_SaleManagerOverView[statecode]="won",ALLEXCEPT(view_Report_Sale_SaleManagerOverView,view_Report_Sale_SaleManagerOverView[Agentname]))

 

 

Unit	agentname	createdon	actualclosedate	statecode
1	A	8/15/2018	9/6/2018	Won
1	A	7/24/2018	9/19/2018	Won
1	A	8/28/2018	9/21/2018	Won
1	A	5/1/2018	9/25/2018	Won
1	A	8/7/2018	9/25/2018	Won
1	A	8/9/2018	9/26/2018	Won
1	A	8/21/2018	9/26/2018	Won
1	A	3/9/2018	9/28/2018	Won
1	A	9/10/2018	9/28/2018	Won
1	C	8/14/2018	9/6/2018	Won
1	C	8/18/2018	9/19/2018	Won
2	J	7/27/2018	9/5/2018	Won
1	J	8/24/2018	9/6/2018	Won
1	J	8/14/2018	9/7/2018	Won
1	J	4/11/2018	9/11/2018	Won
1	J	8/13/2018	9/14/2018	Won
1	J	7/30/2018	9/21/2018	Won
1	J	8/23/2018	9/27/2018	Won
1	J	8/14/2018	9/28/2018	Won
1	N	8/9/2018	9/5/2018	Won
1	N	7/17/2018	9/6/2018	Won
1	N	7/12/2018	9/11/2018	Won
1	N	8/23/2018	9/21/2018	Won
1	N	9/11/2018	9/21/2018	Won
1	N	8/23/2018	9/27/2018	Won
1	N	9/24/2018	9/28/2018	Won
1	S	8/22/2018	9/4/2018	Won
1	S	8/3/2018	9/7/2018	Won
1	S	8/10/2018	9/7/2018	Won
1	S	8/15/2018	9/10/2018	Won
1	S	8/20/2018	9/10/2018	Won
1	S	8/28/2018	9/11/2018	Won
1	S	5/10/2018	9/13/2018	Won
1	S	6/15/2018	9/18/2018	Won
1	S	7/13/2018	9/19/2018	Won
1	S	7/27/2018	9/20/2018	Won
1	S	8/29/2018	9/20/2018	Won
1	S	9/20/2018	9/25/2018	Won
1	S	8/14/2018	9/26/2018	Won
1	S	7/26/2018	9/27/2018	Won
1	S	9/7/2018	9/28/2018	Won
1	T	8/16/2018	9/20/2018	Won
1	T	6/27/2018	9/25/2018	Won
1	T	8/30/2018	9/27/2018	Won
2	T	9/6/2018	9/28/2018	Won
1	T	9/14/2018	9/28/2018	Won
1	Z	6/27/2018	9/12/2018	Won
1	Z	8/28/2018	9/17/2018	Won
1	Z	8/17/2018	9/19/2018	Won
1	Z	8/6/2018	9/25/2018	Won
2	Z	8/16/2018	9/25/2018	Won
1	Z	9/21/2018	9/27/2018	Won

 

The PowerBi report would be like:

 

Created on is the date slicer with hierarchy year- Month.

 

The table would have:

 

AgentName     UnitLeased      Unit 75% percentile.

 

please let me know if this would help you resolve my issue.

Capture.PNG

Are you looking for something like this?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Yes.

You can get the file here: 

 

https://1drv.ms/u/s!AiiWkkwHZChHjyqWWXNtE1Qrsyre

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

At first clance it looks like it works, when you try other percentiles though it fails, also plotting it over time really screws it up, it's a shame because it would be really useful

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.