Forum Discussion
Conditional colour format Bar chart
- 1 year ago
Hi SnagalapurThank you for reaching out to the Microsoft Fabric Forum Community.
Can you try below DAX
Bar Chart Color Format =
VAR SelectedKPI = SELECTEDVALUE('KPI''s'[KPI's]) -- This refers to the field parameter slicer
VAR KPIValue =
SWITCH(
SelectedKPI,
"Act v. Bud", [Act v. Bud (Top 10 Bar chart)],
"Act v. Fcst", [Act v. Fcst (Top 10 Bar chart)],
"Act v. LY", [Act v. LY (Top 10 Bar chart)],
BLANK()
)
RETURN
IF(KPIValue < 1, "#FF0000", "#00CC66")
If this information is helpful, please “Accept as solution” to assist other community members in resolving similar issues more efficiently.
Thank you.
Please share some sample data and show which fields are placed in the bar chart and in the field parameter?
Hi Please find details of fields used in chart.
Field paramater:
- v-priyankata1 year agoCommunity Support
Hi SnagalapurThank you for reaching out to the Microsoft Fabric Forum Community.
Can you try below DAX
Bar Chart Color Format =
VAR SelectedKPI = SELECTEDVALUE('KPI''s'[KPI's]) -- This refers to the field parameter slicer
VAR KPIValue =
SWITCH(
SelectedKPI,
"Act v. Bud", [Act v. Bud (Top 10 Bar chart)],
"Act v. Fcst", [Act v. Fcst (Top 10 Bar chart)],
"Act v. LY", [Act v. LY (Top 10 Bar chart)],
BLANK()
)
RETURN
IF(KPIValue < 1, "#FF0000", "#00CC66")
If this information is helpful, please “Accept as solution” to assist other community members in resolving similar issues more efficiently.
Thank you.- v-priyankata1 year agoCommunity Support
Hi
I hope the information provided was helpful. If you still have questions, please don't hesitate to reach out to the community.
Thanks.