Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Column chart color change for bars in future

Hello, I have a dax function that gives me the following results:

 

Sales Actual Value Graph =

IF(
CALCULATE(
   [Sales FP Value],
    FILTER(
        dim_calendar_v1,
        dim_calendar_v1[Test] = "Active"
     
           )
)<>0,
CALCULATE(
   [Sales FP Value],
    FILTER(
        dim_calendar_v1,
        dim_calendar_v1[Test] = "Active"
     
           )
),
           CALCULATE(
   [Sum Sales Plan Value],
    FILTER(
        fact_salesplan_v1,
        fact_salesplan_v1[scenario_plan] = "BDG"
                 )
)
           )




>>>> What it does is, it gives me sales for actual month and displays the forecast for the coming months like this, for January 24 actual sales and feb onwards forecast:

EktaMaurya17_0-1705510974425.png

 

>>> What I would like to do is attribute a different color to the bars starting from Feb so that it's visual enough to distingush between actuals and forecast. Can anyone help me with this? is there a way to add color formating with my actual dax?
 
Any help is appreciated!
 
Thanks,
Ekta
2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

If you need to change the color of data after February, you can try the following methods:

 

First of all, I created a sample and a measure:

color =
VAR _B = MAXX('Table',MONTH('Table'[Date]))
RETURN
IF(_B>=2,"red","Blue")

A bar chart was then created

In the visualizations pane under Formatt your visual, search for Columns and click fx under Color:

vzhengdxumsft_0-1705561999976.png

Then select Field value, and select the measure you just created in What field should we base this on.

vzhengdxumsft_1-1705561999977.png

The result is as follow:

vzhengdxumsft_2-1705562025903.png

 

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

hi @Anonymous 

 

This did not work as I am using grouped bar chart I guess..

 

I dont get the option to select fx:

EktaMaurya17_0-1705584646265.png

Would you have another work around?

 

Thanks,

Ekta

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.