The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a graph that I would like to calculate the 10th and 90th percentiles figures on the X axis.
The graph is an area chart, its values are not complex.
Can someone please advise how I might add calculate and add these percentile lines?
AM OK with using a custom measure if that is needed.
Thanks in advance 🙂
Solved! Go to Solution.
Hello @wokka
Try this
Percentile_10 =
PERCENTILEX.INC(
ALL('YourTable'),
'YourTable'[XValue],
0.1
)
Percentile_90 =
PERCENTILEX.INC(
ALL('YourTable'),
'YourTable'[XValue],
0.9
)
Add Constant Lines to the X-axis in Your Visual
Now add the percentile lines as X-axis constant lines in your area chart:
Steps
Click on the area chart visual.
Go to the Visualizations pane > Format pane.
Expand Analytics.
Under X-Axis Constant Line, click + Add.
In the value, insert your measure:
For 10th: Percentile_10
For 90th: Percentile_90
Set label, colour, and position as desired.
Thanks
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hello @wokka
Try this
Percentile_10 =
PERCENTILEX.INC(
ALL('YourTable'),
'YourTable'[XValue],
0.1
)
Percentile_90 =
PERCENTILEX.INC(
ALL('YourTable'),
'YourTable'[XValue],
0.9
)
Add Constant Lines to the X-axis in Your Visual
Now add the percentile lines as X-axis constant lines in your area chart:
Steps
Click on the area chart visual.
Go to the Visualizations pane > Format pane.
Expand Analytics.
Under X-Axis Constant Line, click + Add.
In the value, insert your measure:
For 10th: Percentile_10
For 90th: Percentile_90
Set label, colour, and position as desired.
Thanks
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Are Percentile_10 & percentile_90 two new custom measures that I add in first then add as a value in the Value box?
Yes
Thanks
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
I did finally work it out - I used
Percentile_10 =
PERCENTILEX.INC(
ALLSELECTED('YourTable'),
'YourTable'[XValue],
0.1
)
Correction - It did actually work, but was down the far x axis so you couldnt see it.
ALLSELECTED forces use of the table values that are just in the graph, rather than the whole table. Hope this helps someone. 🙂
Hi @wokka ,
We really appreciate your efforts and for letting us know the update on the issue.
Please continue using fabric community forum for your further assistance.
If this is the solution that has worked for you please accept your reply as solution so as to help other community members who may face similar issue in the future.
Regards,
Community Support Team