Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Is it possible to color code the bars with respect to trendline ?
Red for negative trendline and green for positive trendline
Thank you
Solved! Go to Solution.
Hi @Anchit_Thomas ,
Even the line and bar graphs generated using the "Analysis" function contain two metrics, but this is not important.
If you just want to change the color of the bar graph, you can do so.
Please refer to my .pbix file.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anchit_Thomas ,
Even the line and bar graphs generated using the "Analysis" function contain two metrics, but this is not important.
If you just want to change the color of the bar graph, you can do so.
Please refer to my .pbix file.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anchit_Thomas ,
Unfortunately, there is no way to add conditional formatting on the trend line, only on the bar.
Please submit your idea .
But if you switch the above visual to a line chart, you will get such a visual.😅
Color =
VAR __current_value = SUM(Sales[Sale 2015])
VAR __preview_value =
CALCULATE(
SUM(Sales[Sale 2015]),
FILTER( ALLSELECTED(Sales), [Rank] = MAX([Rank]) - 1 )
)
RETURN
IF(
__current_value - __preview_value <=0,
"Red","Green"
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, i want to confirm one thing to make sure you understood it correctly.
I am only using one metric (ex: sales in your case) for bar graph. Trendline is generated using "Analytics" pane built in PBI. Trendline isnt a representation of anyother metric.
Requirement is color of bar to change according to growth or de-growth of trendline.
I can see in your image that you are using two metrics - one for bar and other for line.
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |