
On this submit I present you a really fast trick to format Line Chart and Space Chart conditionally in Energy BI. As it is a “Fast Tip” I’m going to maintain this submit actually quick.
One in all my clients requested me to point out time collection in line charts and space charts. However she need’s it to be conditionally formatted based mostly on the typical worth over time. Let’s maintain it easy, she needs to point out “Gross sales by 12 months Month” in line chart, however, spotlight the info factors which are beneath “Common Gross sales per 12 months Month”. As chances are you’ll know, we at the moment shouldn’t have the luxurious of formatting line charts and space charts. However wait, this submit is all about that. Let’s dig into it.
Let’s do it.
It’s very easy to do, simply comply with the steps beneath:
- Put a column chart on the canvas
- Add the “12 months Month” column to the column chart’s Axis
- Add the measure to the column chart’s Values
- Format the column chart conditionally, extra on this later
- Flip the column chart to line chart or space chart by choosing line/space chart from Visuals pane
That’s it. Let’s look into extra particulars of the answer.
This methodology completely help conditional formatting, however it’s a must to take note of the sector you’re utilizing on X Axis. You must have steady values on X axis, subsequently the values should be both a “quantity” or “date” (datetime). What you usually see in values of “12 months Month” column is a string like “2019 Jan”, “2019-Jan” or “2019 – Jan”, proper? So that you simply have to convert “2019 Jan” or “2019-Jan” to “date” information sort both in Energy Question or through the “Column Instruments” from the ribbon. If we don’t convert string to this point and put the “12 months Month” on X Axis, now we have “Categorical” sort on X Axis and that’s NOT what we would like.

Have you ever used this methodology? Have you learnt a greater methodology to do the identical factor? Please share your ideas within the feedback part beneath.
Obtain the PBIX file from right here.