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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.