Forum Discussion
Line Chart: Conditional Formatting
- 8 years ago
Hi Anonymous,
Currently, this feature is not supported in Power BI Desktop, you could vote this idea which has been submitted in Power BI ideas forum.
For the workaround, I have made a test that you could create two measures to get the result below.
sales1 = IF(SUM(Test[Sales])>40,BLANK(),SUM(Test[Sales]))
sales2 = IF(SUM(Test[Sales])>40,SUM(Test[Sales]),BLANK())
The line chart shows red which sales >40 and black which sales<=40.
Best Regards,
Cherry
Hi Anonymous,
Currently, this feature is not supported in Power BI Desktop, you could vote this idea which has been submitted in Power BI ideas forum.
For the workaround, I have made a test that you could create two measures to get the result below.
sales1 = IF(SUM(Test[Sales])>40,BLANK(),SUM(Test[Sales]))
sales2 = IF(SUM(Test[Sales])>40,SUM(Test[Sales]),BLANK())
The line chart shows red which sales >40 and black which sales<=40.
Best Regards,
Cherry
works like a charm. thanks mate!
- SDheeraj8 years agoFrequent Visitor
Hi,
If you created two measures one with greater than target & lesser than target, how were you able to achieve continous line with Color formating ?
Thanks in Advance,
Sai
- jesly_ajin7 years ago
Helper III
Kindly help me how to join this line as shown above. I created 2 measures for this, but the lines are not joining.
- manson1317 years agoRegular Visitor
hi,
i am new to Dax and power BI.
can share with me how this work? where do you enter the DAX code to make the two line appeared in the visual chart?
how can we create another table to record down all the points that are out of the boundary?
- Anonymous6 years agoNot applicable
When trying to recreate this code, I cannot get the continous line to go below the specified target, does anyone have a solution?
- Anonymous6 years agoNot applicable
How to achieve this? would you kindly to share, please. thank you
- PaulDBrown6 years ago
Community Champion
Let me join this thread if I may...
There is a "quick an dirty" way of using conditional format on a Line Chart which is a bit of a hack (a bug maybe), is not documented as far as I'm aware, and is limited in the formatting options available
The method is simple. Start with a bar chart and add your conditional formatting on this chart:
Now simply change the visual to a Line Chart by selecting the visual type in the visuals pane:
(I actually came across this by accident while playing around with visuals).
Unfortunately the line colour is unaffected, and you can't play around with the shapes etc... (not really surprising).
However, it is another option in our toolbox.
- Anonymous4 years agoNot applicable
Paul, thank you very much for this post! I've also created formatted dots in line chart by accident and spent a lot of time to find out how I've acchieved that. So you've explained here.
Just to add that line colour can be changed. Maybe it couldn't two years ago.
- Anonymous4 years agoNot applicable
How did you get the lines to join? Pls share file