cancel
Showing results for
Did you mean:
Highlighted
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.

Thanks!

3 REPLIES 3
Highlighted
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.

---------------------------------------

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

Proud to be a Super User!

Highlighted
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 -https://community.powerbi.com/t5/Community-Blog/Display-Label-Only-on-the-Last-Data-Point-of-the-Lin...

Proud to be a Super User!

Highlighted
Regular Visitor

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 ]

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### 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