Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello
I'm trying to compare the productivity of my staff with national benchmarks. I've attached the Excel version and my Power BI model attempt (it's incomplete). My version of Excel works great, but I'm having a hard time figuring out how to migrate that formula to Power BI. Published data has four levels (25th %tile, Median, 75th %tile and 90th %tile). The calculator is used to compare the production of my staff and provides additional %tiles other than published values such as (30o, 44o, 65o, 95o, etc.). The calculation steps used in Excel are below; the formula uses quite a few nested ifs:
I've been stuck on this issue for some time and as a stop gap you've been using Excel for calculation and then importing the results into Power BI. I've done a lot of research and, unfortunately, I've been more confused. From what I understand, however, that Power BI measures can be greatly simplified, as there are a lot of redundant values in my approach (which doesn't work anyway).
Thank you for your time. I've tried to explain the logic behind the formula. My hope is that it will help convey what I'm trying to achieve. The links are as follows:
Excel: https://www.dropbox.com/s/d1k7161yh7u3vb3/%25tile%20Calculator.xlsx?dl=0
Power BI: https://www.dropbox.com/s/8nnl6tubw6abdmi/Productivity%20Percentile%20Calculator.pbix?dl=0
Solved! Go to Solution.
Hi @StaticElectric ,
Try to create a calculated column like so:
Percentile Calculator =
VAR ile25 =
RELATED ( 'dim Published Percentile Table'[25th %ile] )
VAR ile50 =
RELATED ( 'dim Published Percentile Table'[50th %ile] )
VAR ile75 =
RELATED ( 'dim Published Percentile Table'[75th %ile] )
VAR ile90 =
RELATED ( 'dim Published Percentile Table'[90th %ile] )
RETURN
IF (
'f Production Data'[Input] < ile25,
DIVIDE ( 'f Production Data'[Input], ile25 ) * 0.25,
IF (
'f Production Data'[Input] >= ile25
&& 'f Production Data'[Input] < ile50,
DIVIDE ( 'f Production Data'[Input] - ile25, ile50 - ile25 ) * 0.25 + 0.25,
IF (
'f Production Data'[Input] >= ile50
&& 'f Production Data'[Input] < ile75,
DIVIDE ( 'f Production Data'[Input] - ile50, ile75 - ile50 ) * 0.25 + 0.5,
IF (
'f Production Data'[Input] >= ile75
&& 'f Production Data'[Input] < ile90,
DIVIDE ( 'f Production Data'[Input] - ile75, ile90 - ile75 ) * 0.15 + 0.75,
IF (
'f Production Data'[Input] >= ile75,
DIVIDE ( 'f Production Data'[Input], ile90 ) * 0.9,
0
)
)
)
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @StaticElectric ,
Try to create a calculated column like so:
Percentile Calculator =
VAR ile25 =
RELATED ( 'dim Published Percentile Table'[25th %ile] )
VAR ile50 =
RELATED ( 'dim Published Percentile Table'[50th %ile] )
VAR ile75 =
RELATED ( 'dim Published Percentile Table'[75th %ile] )
VAR ile90 =
RELATED ( 'dim Published Percentile Table'[90th %ile] )
RETURN
IF (
'f Production Data'[Input] < ile25,
DIVIDE ( 'f Production Data'[Input], ile25 ) * 0.25,
IF (
'f Production Data'[Input] >= ile25
&& 'f Production Data'[Input] < ile50,
DIVIDE ( 'f Production Data'[Input] - ile25, ile50 - ile25 ) * 0.25 + 0.25,
IF (
'f Production Data'[Input] >= ile50
&& 'f Production Data'[Input] < ile75,
DIVIDE ( 'f Production Data'[Input] - ile50, ile75 - ile50 ) * 0.25 + 0.5,
IF (
'f Production Data'[Input] >= ile75
&& 'f Production Data'[Input] < ile90,
DIVIDE ( 'f Production Data'[Input] - ile75, ile90 - ile75 ) * 0.15 + 0.75,
IF (
'f Production Data'[Input] >= ile75,
DIVIDE ( 'f Production Data'[Input], ile90 ) * 0.9,
0
)
)
)
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Icey thank you very much for your help! I have done extensive testing on this for the past two days and this solution works very well! I had read about variables before but had not used them. Thank you for teaching me a new approach. I was able to apply this solution to four other situations. I am truly grateful!
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |