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
Wiene24
Helper II
Helper II

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

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community 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.

 

21.PNG22.PNG

 

23.PNG

 

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

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

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community 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.

 

21.PNG22.PNG

 

23.PNG

 

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

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

@v-lid-msft thanks, that is exactly what I needed!

amitchandak
Super User
Super User

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])),"##,###.##")

 

 

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.