Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I'm trying to make a target area for my data, but it's coming out as a trapezoid and I need it to be rectangular. I get the data via DirectQuery (sample below).
I have 4 main measures:
m_Greenline = IF([m_Score]>=7.5, [m_Value2], BLANK())
m_Lower = 0
m_Redline = IF([m_Score]<7.5, [m_Value2], BLANK())
m_Target = MAXX(data_sample, [Target]+0)
m_Value2 = SUMX(data_sample,[Value2])
m_Score is another measure in a different table, but it's hard-coded right now (m_Score = 5). Based on the score, one of the lines disappears and the other appears, and they are colored red or green as above (trying to make a dynamically colored line). I want to add to this line chart a target area using Error Bars/Bands, but I get a trapezoid. I want a recantgle with the width in [99, 99.6] and height = m_Target.
I was able to accomplish something close with the Line and Stack Column Chart, but it's with the x-axis as "Categorical". I would like to use x-axis "Continuous". Is this possible with Line Chart (or some other visualization)?
This is what I get:
I want something like this but "Continuous":
data_sample:
| Percentiles | Value1 | Value2 | Target |
| 10 | 0 | 0 | |
| 25 | 0 | 0 | |
| 50 | 1 | 0 | |
| 75 | 7 | 2 | |
| 90 | 33 | 11 | |
| 95 | 93 | 36 | |
| 98 | 259 | 121 | |
| 99 | 462 | 273 | 1,400 |
| 99.2 | 516 | 335 | 1,400 |
| 99.4 | 692 | 418 | 1,400 |
| 99.6 | 821 | 524 | 1,400 |
| 99.8 | 1,136 | 851 | |
| 99.9 | 1,315 | 1,085 | |
| 99.99 | 1,932 | 891 |
Solved! Go to Solution.
I solved my issue. It looks like part of my issue was strictly setting the lower bound to 0. The lower bound measure (m_lower) should
The upper bound measure should simply return whatever Target is for the Percentile (BLANK or numerical value).
I believe that idea works. I don't have an exact solution/measure as I ended up going in a slightly different direction.
I solved my issue. It looks like part of my issue was strictly setting the lower bound to 0. The lower bound measure (m_lower) should
The upper bound measure should simply return whatever Target is for the Percentile (BLANK or numerical value).
I believe that idea works. I don't have an exact solution/measure as I ended up going in a slightly different direction.
P.S. There could be other solutions. I think creating a new column with the values I described for m_lower should work as the lower bound too. In my case, I think I created a new column in my query with the lower bound described in my answer and I believe it worked too.
| Percentiles | Value1 | Value2 | Target | Lower |
| 10 | 0 | 0 | ||
| 25 | 0 | 0 | ||
| 50 | 1 | 0 | ||
| 75 | 7 | 2 | ||
| 90 | 33 | 11 | ||
| 95 | 93 | 36 | ||
| 98 | 259 | 121 | ||
| 99 | 462 | 273 | 1,400 | 0 |
| 99 | 516 | 335 | 1,400 | 0 |
| 99 | 692 | 418 | 1,400 | 0 |
| 100 | 821 | 524 | 1,400 | 0 |
| 100 | 1,136 | 851 | ||
| 100 | 1,315 | 1,085 | ||
| 100 | 1,932 | 891 |
Not sure what happened to the decimals.
| Percentiles | Value1 | Value2 | Target | Lower |
| 10 | 0 | 0 | ||
| 25 | 0 | 0 | ||
| 50 | 1 | 0 | ||
| 75 | 7 | 2 | ||
| 90 | 33 | 11 | ||
| 95 | 93 | 36 | ||
| 98 | 259 | 121 | ||
| 99 | 462 | 273 | 1,400 | 0 |
| 99.2 | 516 | 335 | 1,400 | 0 |
| 99.4 | 692 | 418 | 1,400 | 0 |
| 99.6 | 821 | 524 | 1,400 | 0 |
| 99.8 | 1,136 | 851 | ||
| 99.9 | 1,315 | 1,085 | ||
| 99.99 | 1,932 | 891 |
@user01 There's one way to do it:
http://www.informationmagician.com/shaded-area-between-two-lines/
@user01 check this video on my YT channel and see if it helps https://youtu.be/Y9Px9ZIjl6k
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.