On this put up I present you a really fast trick to format Line Chart and Space Chart conditionally in Energy BI. As this can be a “Fast Tip” I’m going to maintain this put up actually brief.
Certainly one of my clients requested me to point out time collection in line charts and space charts. However she need’s it to be conditionally formatted primarily based on the common worth over time. Let’s hold it easy, she needs to point out “Gross sales by Yr Month” in line chart, however, spotlight the info factors which are beneath “Common Gross sales per Yr Month”. As it’s possible you’ll know, we presently would not have the luxurious of formatting line charts and space charts. However wait, this put up 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 “Yr 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 methodology completely assist conditional formatting, however you must take note of the sphere you’re utilizing on X Axis. It is advisable to have steady values on X axis, subsequently the values should be both a “quantity” or “date” (datetime). What you usually see in values of “Yr 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” knowledge kind both in Energy Question or by way of the “Column Instruments” from the ribbon. If we don’t convert string so far and put the “Yr Month” on X Axis, now we have “Categorical” kind on X Axis and that’s NOT what we wish.
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.