Forum Discussion

srhooey's avatar
srhooey
Regular Visitor
4 years ago

Percentile What If calculation

I have been asked to do this in Power BI.  The following table shows a Representation of my data.

 

Grouping IdentifierValueWhat If Value
A105
A157.5
A2010
A105
B92.86
B185.71
B3611.4
B206.35
C1212
C55
C22
C33
   
25th Percentile8 

 

I actually have hundreds of Grouping Identifiers with thousands of data points for each identifier.

 

The column "Value" represents the actual value.  As you can see the 25th Percentile for these values is 8.  Say we have a target of 5 for the 25th percentile.

 

The column "What If Value" represents what each record might look like if we managed to reduce the actual value by a ratio to get that Grouping Identifer to the target of 5 for the 25th Percentile.  The Grouping Identifier of "C" was not modified because it already met the target 25th percentile.

 

These two columns have already been calculated in Power Query.

 

My task is to determine the overall 25th percentile if we managed to get the reach target with specific underperforming Grouping Identifiers.

 

Effectively

If "Grouping Identifer" selected, use "What If Value" in the Percentile.inc else use "Value" in the Percentile.inc

 

I've tried many approaches and can't get any to work.  The selections of "Grouping Identifers" to use in the adjustment may be one or many.

 

Thanks in advance

 

 

1 Reply

  • srhooey , Are you trying like this

    PERCENTILE.INC(Table[value], [what if measure] )

     

    or

    measure =

    var _max = maxx(allselected(whatif), whatif[value])

    return

    PERCENTILE.INC(Table[value],_max )