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
CHEduardo
Frequent Visitor

Help with Lookupvalue and Time Conditions

Hello all,

 

I'm trying to create a new table with some informations from 2 others tables, but I need to compare the time without the seconds, and if the minutes are odd, I need to put in the next even minute.

 

This is the table "Speed Mac"

CHEduardo_0-1656923181392.png

 

This is the table "Stops"

CHEduardo_2-1656923827842.png

 

 

And the result that I want is "TimeStopSpeed"

CHEduardo_1-1656923791640.png

 

 

Thankyou for any help!!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@CHEduardo , create a new column in Stops

 

New Minute =

var _time = datevalue([stopbegtime]) + time(hour([stopbegtime]), minute([stopbegtime]), 0)

return 

if(mod(minute(_time) , 2) =0, _time , _time +time(0,1,0)

 

Now create a new column

Speed Mac

 

New col =

var _time = datevalue([repTime]) + time(hour([repTime]), minute([repTime]), 0)

return

maxx(filter(Stops, Stops [New Minute] = _time ) , Stops[Text])

 

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@CHEduardo , create a new column in Stops

 

New Minute =

var _time = datevalue([stopbegtime]) + time(hour([stopbegtime]), minute([stopbegtime]), 0)

return 

if(mod(minute(_time) , 2) =0, _time , _time +time(0,1,0)

 

Now create a new column

Speed Mac

 

New col =

var _time = datevalue([repTime]) + time(hour([repTime]), minute([repTime]), 0)

return

maxx(filter(Stops, Stops [New Minute] = _time ) , Stops[Text])

 

 

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.