
On this publish 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 publish actually brief.
One in all my prospects requested me to indicate time sequence 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 preserve it easy, she needs to indicate “Gross sales by 12 months Month” in line chart, however, spotlight the information factors which might be beneath “Common Gross sales per 12 months Month”. As you might know, we presently would not have the luxurious of formatting line charts and space charts. However wait, this publish is all about that. Let’s dig into it.
Let’s do it.
It’s very easy to do, simply observe 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 deciding on line/space chart from Visuals pane
That’s it. Let’s look into extra particulars of the answer.
This technique completely helps conditional formatting, however it’s a must to take note of the sphere you’re utilizing on X-Axis. You should have steady values on X axis, due to this fact the values have to be both a “quantity” or “date” (datetime). What you often see within the values of the “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, we now have “Categorical” sort on X Axis and that’s NOT what we would like. One other level that’s worthwhile to say is that this technique solely works when we now have one measure on the chart. Sadly this technique wouldn’t work with a number of measures.

Have you ever used this technique? Are you aware a greater technique to do the identical factor? Please share your ideas within the feedback part beneath.
Associated
Uncover extra from BI Perception
Subscribe to get the newest posts despatched to your e-mail.