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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
wokka
Helper IV
Helper IV

How to add percentiles to a graph as X axis constant line

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 🙂   

1 ACCEPTED SOLUTION
pankajnamekar25
Super User
Super User

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

 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

 

View solution in original post

5 REPLIES 5
pankajnamekar25
Super User
Super User

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

 Pankaj Namekar | LinkedIn

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

 Pankaj Namekar | LinkedIn

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

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors