Forum Discussion

hugus's avatar
hugus
Helper I
6 years ago

ribbon chart - indicate current day

Hi 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

  • v-alq-msft's avatar
    v-alq-msft
    Community Support

    Hi, hugus 

     

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

    Table:

     

    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.

     

     

    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.

     

    Best Regards

    Allan

     

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

    • hugus's avatar
      hugus
      Helper I

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

      • v-alq-msft's avatar
        v-alq-msft
        Community Support

        Hi, hugus 

         

        I have modified my data.

         

         

        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.

         

        Best Regards

        Allan

         

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