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