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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hugus
Helper I
Helper I

ribbon chart - indicate current day

image.pngHi All

I have a ribbon chart with values for product quality by day. There is actual data for today and in the past and forecast data for days in the future. It us used at a pre-start LEAN meeting where i want users to quickly see "where we have been, where we are today, and where we are heading" with regards to quality. 

 

To help - i want to indicate on the chart where "today" is.......either a straight line that always shows on the current day or somehow fade the colours slightly for days in the past.

 

note the chart always shows 5 days ago until 7 days from now....

 
 
7 REPLIES 7
v-alq-msft
Community Support
Community Support

Hi, @hugus 

 

Based on your description, I created data to reprodue your scenario.

Table:

a1.png

 

You may create two measures as below.

DisplayColor = 
IF(
    SELECTEDVALUE('Table'[Date]) = TODAY(),
    "red","blue"
)

visual control = 
var _date = SELECTEDVALUE('Table'[Date])
var _datediffago = DATEDIFF(_date,TODAY(),DAY)
var _datedifffuture = DATEDIFF(TODAY(),_date,DAY)
return
IF(
    OR(
        AND(
            _datediffago>=0,
            _datediffago<=5
        ),
        AND(
            _datedifffuture>=0,
            _datedifffuture<=7
        )
    ),
    1,
    0
)

 

Then you may make the visual selected, go to 'Visualizations' ribbon, click 'Format'=> 'Data colors'=>'Conditional formatting'. You may set it as below.

a2.png

 

a3.png

 

Finally you need to put the 'visual control' meausre in the visual level filter. Here is the result. It displays the data in the past five days and the data in the next seven days.

a4.png

 

Best Regards

Allan

 

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

thank you @v-alq-msft - this looks great however i cannot see where conditional formatting is an option for ribbon charts....image.png

Hi, @hugus 

 

If you put more than one fields in 'Value', it has the same effect as putting a field in the 'Legend'. You may have a try. When you put a field in 'Legend', then you can only put a field in 'Value'. If you have several fields in 'Value', then you can't  put a field in 'Legend'.

Best Regards

Allan

Yes i see - so I'm needing 3 fields for 'value'......in that case i guess this cannot be done?

 

thank you for your assistance

Hi, @hugus 

 

It is unsupported to achieve you requirement in Power BI currently. I'd like to suggest you post a new idea in Idea Forum and add your comments there to improve Power BI for making this feature coming sooner.

 

Best Regards

Allan

 

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

Hi, @hugus 

 

I have modified my data.

f1.png

 

 

I wonder if you have a field put on the 'Legend'. If it is, 'Conditional formatting' will not appear. It classifies the visual as the 'Category'.  It is designed to be like this.

f2.png

f3.png

 

Best Regards

Allan

 

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

amitchandak
Super User
Super User

It seems like conditional control in only available when you have only one series

color = if(max('Calendar'[Date])=date(2020,02,15),"red","green")

I was able to change color using the Field option and a measure. The same way it has been given here https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

You need to try like

color = if(max('Calendar'[Date])=Today(),"red","green")

,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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