3 easy steps to use SWITCH function to make a conditional coloured bar charts in Power BI
Power BI is a platform that allows you to connect to various data sources, transform and model your data, and create interactive dashboards and reports. Power BI can help you gain insights from your data and communicate them effectively.
What are Bar Charts or Graphs?
Bar graphs, also known as bar charts, are a type of data visualization that represent data in the form of vertical or horizontal rectangular bars. The length of the bars is proportional to the measure of the data they represent. Bar graphs are a powerful tool in statistics for the presentation, analysis and interpretation of data. They make it easy to compare data and understand trends.
Building the Chart
We will be making this Chart:
In this chart we are taking customer_region which is a categorical data in Y- axis and YoY Sales in X- axis and if YoY Sales>0 then we are assigning Green colour to bars, if YoY Sales<0 then we are assigning Red colour to bars and if YoY Sales = 0 then Blue colour.