Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Different bar colour based on a changing number

I'm trying to get a bar graph which which has bars for daily revenue, and then for today, today's revenue and prediction. 


The trouble is i'm not sure how to get the prediction part a different colour (like in the hideous graph below)



The prediction also changes daily and throughout the day.




Super User IV
Super User IV

@AnonymousTurtle - Maybe sample data would help but it would seem to me that you would need a way to classify the data and use a stacked bar chart but to be specific about it, I would need some sample data to mess around with. What I am thinking is a disconnected table for the Legend but I'd need to experiment.


@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Super User IV
Super User IV

@AnonymousTurtle , if you want to show as stacked or clustered column visual have a measure that returns only today's Target


if(Max(Date[Date]) = Today(), [Target],blank())

The one you want might not be possible.

Another option is to show a line dot. The same formula should work

Also, refer my blog for this -

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!


Can't provide you with the actual sample data but basically what I have is a bunch of data of: dates, individual completed jobs, individual completed job charges, and also jobs that are not completed yet (which we want to predict the revenue based on the average individual completed job charges).


Graph = IF(LASTDATE(*dates*) = TODAY(), [Prediction today], *revenue*)


and [Prediction today] = ([Predict Jobs] * [Avg revenue per job for today]) + CALCULATE([Renvenue for today], *dates*= TODAY())


where the * are data * and [ are measures ]

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!


Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors