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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AnonymousTurtle
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)

AnonymousTurtle_0-1599274495398.png

 

The prediction also changes daily and throughout the day.

 

Thanks!

 

3 REPLIES 3
amitchandak
Super User
Super User

@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...

Greg_Deckler
Super User
Super User

@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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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