Forum Discussion

Wiene24's avatar
Wiene24
Icon for Helper II rankHelper II
7 years ago
Solved

Advance card condition time

Hi,

 

I have a measurement that calculates the average arrival time of our trucks.

Hereby I have created an Advanced Card visual but now I want to put a condition on it.

Only the condition tool doesn't allow you to put in a time format. How can I work my way around this?

 

Kind regards,

 

Tim Wijnen

  • Hi Wiene24 ,

     

    If your arrive time is format as HH:MM:SS, we can create following measure to convert this to second value,

     

    AverageSecondValue =
    HOUR ( [AverageArriveTime] ) * 3600
        + MINUTE ( [AverageArriveTime] ) * 60
        + SECOND ( [AverageArriveTime] )

     

    Then we can use it as condition field, and set different color conditons in the condition label.

     

     

     

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ DongLi
    If this post helps, then please consider Accept it as the solution to help the other members find it more

3 Replies

  • Can you try format on top of the formula

    Like

     

    format Date = FORMAT(CALCULATE(max(DATA1[Date])),"MMM, DD YYYY")
    Formated Value = FORMAT( CALCULATE(SUM(DATA1[Value])),"##,###.##")

     

     

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi Wiene24 ,

     

    If your arrive time is format as HH:MM:SS, we can create following measure to convert this to second value,

     

    AverageSecondValue =
    HOUR ( [AverageArriveTime] ) * 3600
        + MINUTE ( [AverageArriveTime] ) * 60
        + SECOND ( [AverageArriveTime] )

     

    Then we can use it as condition field, and set different color conditons in the condition label.

     

     

     

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ DongLi
    If this post helps, then please consider Accept it as the solution to help the other members find it more