Forum Discussion
TOP3 and Bottom 3
- Anonymous3 years ago
Hi AjithReddy049 ,
You can create a measure as follows.
Measure = var _amount=SUM('Table'[Sales Amount]) var _all=CALCULATE(SUM('Table'[Sales Amount]),ALLSELECTED('Table')) var _percent=DIVIDE(_amount,_all) return SWITCH(TRUE(),_percent>0.17,"green",_percent<0.03,"red",_percent<=0.17&&_percent>=0.03,"blue")Go to the following setting and click "fx".
Select "Field value" in Format Style and then choose the measure just created.
Click OK, the result is below.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey AjithReddy049 ,
I'm wondering if you tried "Color by rules" as described in this article: https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting?WT.mc_id=DP-MVP-5003068
Of course, instead of using the table formatting option, you start the conditional formatting here, because it's column chart:
Besides that, the article is also valid for column charts.
Hopefully, this gets you started, if not, please describe why "Color by rules" can not be applied to your problem.
Regards,
Tom
TomMartens in my case I would like to show variations in bar color if > 80% Green, >60 to <30 Blue, and>30 Red like that, is there any possibility we can achieve this thing in bar chat?
thanks & Regards,
Ajith Reddy
- TomMartens3 years agoSuper User
Hey AjithReddy049 ,
did you check the article?If not, please describe why not and also provide sample data and explain the expected result based on the sample data you provide.
Regards,
Tom
- Anonymous3 years agoNot applicable
Hi AjithReddy049 ,
You can create a measure as follows.
Measure = var _amount=SUM('Table'[Sales Amount]) var _all=CALCULATE(SUM('Table'[Sales Amount]),ALLSELECTED('Table')) var _percent=DIVIDE(_amount,_all) return SWITCH(TRUE(),_percent>0.17,"green",_percent<0.03,"red",_percent<=0.17&&_percent>=0.03,"blue")Go to the following setting and click "fx".
Select "Field value" in Format Style and then choose the measure just created.
Click OK, the result is below.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.