top of page

Power BI Viz Tricks - Line chart target areas

Updated: Dec 1, 2022

A few months ago, I was asked to build a line chart with target areas, something like the chart below (which by the way will be our final solution!):


At the time I could not really find an easy way to achieve this... Until error bars came out!


Don't be fooled though, it's still a bit tricky to build a line chart like this, however I found it way easier now than before.


So, you must be thinking now "how did you do that?".


Well, let's find out!



1) I started out with my base chart, which is just showing Profit Over Time. I'm just using a simple sum measure for the profit, and a Date field from my data. Nothing too fancy.


2) Now we are going to work on the "Above Target" Area, or the one in green in the first image of this blog post.


To do this, we are going to use the Error Bars feature.

Even though the intention of this feature was not really for this kind of purpose, there is no limit to creativity in Power BI and you can, and should, be creative with all the formatting options in Power BI.


To start, we are going to the Advanced Options tab in the formatting pane, and then open the Error Bars section:



Once you open the Error Bars Section you will see something like this:




























For this example, we will be using a measure to define the Upper Bound and the Lower Bound for the "Above target" area.


I created two simple measures for this:

Profit Above Target Upper Bound = 50
Profit Above Target Lower Bound = 35

Your measures can be anything you want, in this case I use just simple numeric values but you can have some DAX for your measure as well.


Once I created these two measures, I just added them to my Error Bar Upper bound and Lower Bound. You should end up with a chart similar to the one below:


It doesn't really look ok yet does it? We are going to work on that in the next step!




3) Time for some formatting tricks! We are now going to do some changes to the looks of our error bars.


First, we are going to add an error band. This will add a shaded area just like the one we want:


Wait, this is still not looking like the target band we want... Let's do some more formatting!

Open the "Error band" section that we turned on, turn off the option "Match series color" (1) and then select a Band color (2).

You can change the transparency if you want, or the style of the band (with line or just filled).


Still not looking right... there is just one more step and we have our Target Area complete.

We just need to remove the error bars that are currently showing. To do this you just have to disable the bars in the "Bar" section:

And we have our Above Target Area!


Now let's move to a more tricky one, the Below Target Area...




4) The second target area will be a bit more tricky than the previous one.

The reason is that you can only use the error bars once for each measure. Because we used it already in our Profit measure, we can't just add a new error bar to that same measure.


So here comes the trick. We will add a new measure to our line chart, that will be exactly the same as our Profit measure. I called this measure something like "Total Profit Dummy".


This measure will allow us to use the error bars once more, this time to create our below target shaded area.

The legend of the chart will look a bit weird with two measures that are the same, and one called "Dummy", but we will fix that later.


Now we can use this new dummy measure to add a new error bar band!

If you go back to the Error Bars options of your line chart, you will see that you now have the option to select either the measure "Total Profit" or "Total Profit Dummy".


We already used the measure Total Profit to create the Above Target shaded area, so now it's time to use our new dummy measure, so let's select it and do the exact formatting process we've done before.


First, enable the Error Bar option:


Create the two measures for the Below target area:

Profit Below Target Upper Bound = 15
Profit Below Target Lower Bound = 0

Add the measures to the corresponding fields in the Error Bar options:



Enable the Error Band option (1), disable the option Match series color and choose your band color (2):

Lastly, disable the Error bars:


5) Tidying You probably noticed I have some labels that match the color of the targets. If above target the labels will show green, if below target the profit labels will show red.


You probably also noticed these labels are not showing when the values are in the "middle", meaning they aren't either above target or below.


How did I do this trick?


With more dummy measures!


I've added two more dummy measures. One to plot the line only if the values are above the target, and another one to plot the line only if the values are below target:

Above target = if( [Total Profit]>35, [Total Profit])
Below target = if( [Total Profit]<15, [Total Profit])

Next, I've added these two new measures to my line chart:


This is now looking a bit weird isn't it? Let's fix it in the next step!



6) In this step, we are going to do some clean up for our new measures.


The first step will be to add some markers to our line chart. I've also increased the size a little bit:


I've applied these changes to all measures, but you can disable the markers for specific measures. I disabled the markers for the Profit measures and let it enabled for my new two metrics "Above Target" and "Below Target":



While you're in the Markers section, change the color of both the "Above Target" and "Below Target" markers to green and red:


The labels of our above and below target markets are still missing, so we will now add them:


The result of enabling the Data Labels option in your line chart will probably look a bit weird.

This is because we currently have 4 measures in our line chart, so it's showing the labels for all of them. We will disable the ones related to the Profits metrics, and leave only the ones for measures "Above target" and "Below target":


One last formatting activity in the labels before we tidy everything up!

In the Data Labels Section, you can format your labels using the options under "Values".

I just added some bold formatting on the text, increased it to size 10 and then just choose a color to match (red and green):



4) Tidying things up a little bit now!


The first thing we are going to do in this last step is removing the extra lines we don't need.

We just need our line chart to show the original line for the Profits values, and not the extra 3 dummy measures we added.


To do this, go to the Formatting tab of your line chart, and in the Lines section make the option Stroke width zero and the line will just magically disappear! Do this for your dummy measures and for the Above Target and Below target measures:


We are almost there!


If you hover over your chart, you will see that the bound values for the Errors Bars will show in your tooltip. You may choose to leave it like this, but I think this is just adding clutter so I'm going to remove these tooltips.



To remove the Error Bar tooltips, go back to the Advanced options of your line chart, then go to your Error Bars section and disable the tooltips for both the Profit and the Dummy Profit measures:


The tooltips for the "Above target" and "Below target" measures will still show though.

You can fix this by using a custom tooltip, maybe for another blog post!




7) The final touch!


Even though it's pretty similar, the chart is still not exactly the same as the one in my example.


Here are the list of the final formatting touches I did:


- Disabled chart legend



- Changed the title to "Sales Profit Over Time", changed text type to Segoe UI Light, increased font to 18



- Removed titles of the X-Axis and Y-Axis, and then removed Y-Axis:


- Changed line color and stroke width




And this, my friends, is how I went from a very basic line chart, to a line chart with custom data labels, target bands and a good formatting!



Full video tutorial on how to build this solution below!





Interested in learning more about Power BI Report Design? Then the Power BI Report Design Bootcamp is for you!


6 Comments


<a href="https://ukweed.shop/product/tokyo-gumdrop-strain/"rel"dofollow">Tokyo Gumdrop Strain</a>

<a href="https://ukweed.shop/product/skywalker-strain/"rel"dofollow">skywalker strain</a>

<a href="https://ukweed.shop/product/plum-popperz/"rel"dofollow">Plum Popperz</a>

<a href="https://ukweed.shop/product/permanent-marker-strain/"rel"dofollow">Permanent Marker Strain</a>

<a href="https://ukweed.shop/product/maine-lobster/"rel"dofollow">MAINE LOBSTER</a>

<a href="https://ukweed.shop/product/magic-shotz-strain/"rel"dofollow">Magic Shotz Strain</a>

<a href="https://ukweed.shop/product/lemon-dropz-strain/"rel"dofollow">Lemon Dropz Strain</a>

<a href="https://ukweed.shop/product/lemon-cherry-guava-strain/"rel"dofollow">Lemon Cherry Guava Strain</a>

<a href="https://ukweed.shop/product/gorilla-glue-strain/"rel"dofollow">Gorilla Glue Strain</a>

<a href="https://ukweed.shop/product/goat-milk-strain/"rel"dofollow">Goat Milk Strain</a>

<a href="https://ukweed.shop/product/glazed-donut-yumz/"rel"dofollow">Glazed Donut Yumz</a>

<a href="https://ukweed.shop/product/fruit-ztripes/"rel"dofollow">Fruit Ztripes</a>

<a href="https://ukweed.shop/product/frosty-pina-colada/"rel"dofollow">Frosty Pina Colada</a>

<a href="https://ukweed.shop/product/doja-exclusive-zoapscotti/"rel"dofollow">DOJA EXCLUSIVE ZOAPSCOTTI</a>

<a href="https://ukweed.shop/product/candy-popz-strain/"rel"dofollow">Candy Popz Strain</a>


<a href="https://ukweed.shop/product/candy-lemonz-strain/"rel"dofollow">Candy Lemonz Strain</a>

<a href="https://ukweed.shop/product/bubblegum-popperz/"rel"dofollow">Bubblegum Popperz</a>

<a href="https://ukweed.shop/product/blue-dream-strain/"rel"dofollow">Blue Dream Strain</a>

<a href="https://ukweed.shop/product/yellow-zkittlez/"rel"dofollow">Yellow Zkittlez</a>

<a href="https://ukweed.shop/product/tropical-cherriez/"rel"dofollow">Tropical Cherriez</a>

<a href="https://ukweed.shop/product/blue-cheese/"rel"dofollow">Blue Cheese</a>

<a href="https://ukweed.shop/product/biscotti-strain/"rel"dofollow">Biscotti Strain</a>

<a href="https://ukweed.shop/product/bali-gumdrop-strain/"rel"dofollow">Bali Gumdrop Strain</a>

<a href="https://ukweed.shop/product/amnesia-haze/"rel"dofollow">amnesia haze</a>

<a href="https://ukweed.shop/product/41-unicorns-strain/"rel"dofollow">41 unicorns strain</a>

Like

<a href="https://soul-cybin.net/product/the-five-masters-natures-gift/" rel="dofollow">The Five Masters – “Nature’s Gift”</a>

<a href="https://soul-cybin.net/product/ceremonial-chocolate-soul-retrieval/" rel="dofollow">Ceremonial Chocolate – “Soul Retrieval”</a>

<a href="https://soul-cybin.net/product/microdose-gummies/" rel="dofollow">Magic Microdose Gummies</a>

<a href="https://soul-cybin.net/product/buy-sample-packs-3-bags-x-5-capsules-get-15-percent-off-cybin-stock/" rel="dofollow">cybin stock|Sample Packs: 3 bags x 5 capsules</a>

<a href="https://soul-cybin.net/product/sample-pack-of-supplements/" rel="dofollow">Sample pack of supplements/Inner Peace</a>

<a href="https://soul-cybin.net/product/medicinal-honey-sweetness-of-life/" rel="dofollow">Medicinal Honey – “The Sweetness of Life”</a>

<a href="https://soul-cybin.net/product/ceremonial-blend/" rel="dofollow">Ceremonial Blend – “The Journey”</a>

<a href="https://soul-cybin.net/product/two-bottle-bundle/" rel="dofollow">Two Bottle Bundle – 30 capsules each (Get 10 Percent Off)</a>

<a href="https://soul-cybin.net/product/the-amplifier/" rel="dofollow">100 Percent Syrian Rue – “The Amplifier”</a>

<a href="https://soul-cybin.net/product/adaptogen-blend/" rel="dofollow">Adaptogen Blend – “Alignment”</a>

<a href="https://soul-cybin.net/product/brain-booster/" rel="dofollow">Brain Booster – “Mental Mastery”</a>

<a href="https://soul-cybin.net/product/inner-peace-the-awakening/" rel="dofollow">Inner Peace – “The Awakening”</a>

<a href="https://soul-cybin.net/product/chocolate-mushroom-elixir/" rel="dofollow">Chocolate Mushroom Elixir – “Sacred Heart Delight”</a>


<a href="https://officialsoulcybin.org/product/chocolate-mushroom-elixir/" rel="dofollow">Chocolate Mushroom Elixir – “Sacred Heart Delight”</a>

<a href="https://officialsoulcybin.org/product/the-five-masters-natures-gift/" rel="dofollow">The Five Masters – “Nature’s…


Like

<a href="https://arborshroom.com/product/buy-polkadot-magic-mushroom/" rel="dofollow">PolkaDot Magic Mushroom Shots 4g</a>

<a href="https://arborshroom.com/product/polkadot-blueberry-muffin-mushroom-chocolate/" rel="dofollow">Polkadot Blueberry Muffin Belgian mushroom Chocolate</a>

<a href="https://arborshroom.com/product/magic-mushroom-chocolate-bars/" rel="dofollow">PolkaDot Acai Magic Mushroom Chocolate</a>

<a href="https://arborshroom.com/product/polkadot-dragonfruit-near-me/" rel="dofollow">Dragonfruit Lemonade</a>

<a href="https://arborshroom.com/product/buy-polkadot-blueberry-muffin/" rel="dofollow">Polkadot Blueberry Muffin</a>

<a href="https://arborshroom.com/product/polka-dot-berries-cream/" rel="dofollow">Polka Dot Berries & Cream</a>

<a href="https://arborshroom.com/product/polka-dot-chocolate-coconut/" rel="dofollow">POLKA DOT CHOCOLATE COCONUT</a>

<a href="https://arborshroom.com/product/lsd-vial-liquid-lsd/" rel="dofollow">LSD Vial (Liquid LSD)</a>

<a href="https://arborshroom.com/product/lsd-acid-200-ug-buy-lsd-acid-200-ug-online/" rel="dofollow">LSD ACID 200 Ug – Buy LSD ACID 200 Ug Online</a>

<a href="https://arborshroom.com/product/buy-soulcybin-ceremonial-blend-the-journey-online/" rel="dofollow">Ceremonial Blend – “The Journey”</a>

<a href="https://arborshroom.com/product/buy-adaptogen-blend-alignment-online/" rel="dofollow">Brain Booster – “Mental Mastery”</a>

<a href="https://arborshroom.com/product/buy-soulcybin-adaptogen-blend-alignment-online/" rel="dofollow">Buy Soulcybin Adaptogen Blend “Alignment”</a>

<a href="https://arborshroom.com/product/buy-soulcybin-100-syrian-rue-the-amplifier-online/" rel="dofollow">Soulcybin 100 % Syrian Rue “The Amplifier”</a>

<a href="https://arborshroom.com/product/infinite-rx-absorb-microdosing-psilocybin-capsules-2/" rel="dofollow">Buy INfinite Rx (Absorb) Microdosing Psilocybin Capsules</a>

<a href="https://arborshroom.com/product/be-youthful-booster-mushroom-supplement-capsules-2/" rel="dofollow">Buy Be Youthful (Booster) online</a>

<a href="https://arborshroom.com/product/buy-mushroom-supplement-capsules/" rel="dofollow">Buy Mushroom Supplement Capsules</a>

<a href="https://arborshroom.com/product/cordyceps-mushroom-gummies/" rel="dofollow">Cordyceps Mushroom Gummies</a>

Like

<a href="https://sprinklezstrain.com/product/chokocovered-banana-marshmallow/" rel="dofollow">ChokoCovered Banana Marshmallow</a>

<a href="https://sprinklezstrain.com/product/funfetti-marshmallow/" rel="dofollow">Funfetti Marshmallow</a>

<a href="https://sprinklezstrain.com/product/raspberry-ripple-marshmallow/" rel="dofollow">Raspberry Ripple Marshmallow</a>

<a href="https://sprinklezstrain.com/product/strawberry-cheesecake-marshmallow/" rel="dofollow">Strawberry Cheesecake Marshmallow</a>

<a href="https://sprinklezstrain.com/product/rainbow-bubblegum-marshmallow/" rel="dofollow">Rainbow BubbleGum Marshmallow</a>

<a href="https://sprinklezstrain.com/product/key-lime-marshmallow/" rel="dofollow">Key Lime Marshmallow</a>

<a href="https://sprinklezstrain.com/product/blueberry-pie-marshmallow/" rel="dofollow">Blueberry Pie Marshmallow</a>

<a href="https://sprinklezstrain.com/product/marshmallow-fruit-pebble/" rel="dofollow">Fruity Pebblez Marshmallow</a>

<a href="https://sprinklezstrain.com/product/marshmallow-watermelon/" rel="dofollow">Watermelon Marshmallow</a>

<a href="https://sprinklezstrain.com/product/marshmallow-birthdaycake/" rel="dofollow">Birthdaycake Marshmallow</a>

<a href="https://sprinklezstrain.com/product/blue-mm-sprinklez/" rel="dofollow">Blue M&M Sprinklez</a>

<a href="https://sprinklezstrain.com/product/marshmallow-super-duper/" rel="dofollow">Marshmallow Super Duper</a>

<a href="https://sprinklezstrain.com/product/marshmallow-froot-loopz/" rel="dofollow">Marshmallow Froot Loopz</a>

<a href="https://sprinklezstrain.com/product/gumdropz-concord-grape/" rel="dofollow">Gumdropz Concord Grape</a>

<a href="https://sprinklezstrain.com/product/sprinklez-gumdropz/" rel="dofollow">Sprinklez Gumdropz</a>

<a href="https://sprinklezstrain.com/product/gumdropz-poppin-papaya/" rel="dofollow">Gumdropz poppin papaya</a>

<a href="https://sprinklezstrain.com/product/gumdropz-mango-mayhem/" rel="dofollow">Gumdropz Mango Mayhem</a>

<a href="https://sprinklezstrain.com/product/gumdropz-wacky-watermelon/" rel="dofollow">Gumdropz Wacky Watermelon</a>

<a href="https://sprinklezstrain.com/product/gumdropz-island-punch/" rel="dofollow">Gumdropz Island Punch</a>

<a href="https://sprinklezstrain.com/product/gumdropz-strawberry-splash/" rel="dofollow">Gumdropz Strawberry Splash</a>

<a href="https://sprinklezstrain.com/product/gumdropz-berry-bonanza/" rel="dofollow">Gumdropz Berry Bonanza</a>

<a href="https://sprinklezstrain.com/product/gumdropz-wild-berry/" rel="dofollow">Gumdropz Wild Berry</a>

<a href="https://sprinklezstrain.com/product/torchiez-blazin-banana/" rel="dofollow">Torchiez Blazin Banana</a>

<a href="https://sprinklezstrain.com/product/torchiez-red-hotz/" rel="dofollow">Torchiez Red Hotz</a>

<a href="https://sprinklezstrain.com/product/torchiez/" rel="dofollow">Original Torchiez</a>

Like

Great tips for utilizing target regions in Power BI line charts! This method improves data visualization, highlighting patterns and benchmarks. Such advanced visualization techniques can be useful in academic research, particularly when working on a dissertation proposal service that demands persuasive data presentation.

Like
datapeers.png

Address

71-75 Shelton Street, Convent Garden

WC2H 9JQ London

© 2025 by Data Pears Consulting. All rights reserved.

bottom of page