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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
andrieskoo
Frequent Visitor

how to find out if there was a meeting when the car was parked

I have two tables Meetings  and CarLocations.
example Meeting table :

ID                  START_DATE             END_DATE           START_LAT    START_LONG   START_TIMESTAMP
1705729.01.2022 11:0429.01.2022 15:4653,5831038419,559965691643450684
1625514.01.2022 17:1914.01.2022 20:5053,6131562620,416737561642177141
1582303.01.2022 15:3203.01.2022 19:0254,1699436219,403645111641220337

 

example CarLocations table:

START_LAT         START_LONG  PARKED_LATPARKED_LONGDURING_TIMESTART_TIME       PARKED_TIME
52,19350121,05798752,19903521,0441523G 24m 31S25.11.2021 16:5125.11.2021 13:27
52,19902221,04411152,19902221,0441112G 07m 01S25.11.2021 19:0025.11.2021 16:53
52,19902221,04411152,30896620,92925821m 44S25.11.2021 19:4925.11.2021 19:27

 

How can I find out if there was a meeting at the stop and which?

Can you help me please?

Thank you!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@andrieskoo , a new column in table carlocations 

 

new column =

var _1  = countx(filter(Meeting, Meeting[START_LONG] >= carlocations[START_LONG] && Meeting[START_LONG] >= carlocations[PARKED_LONG] && Meeting[START_LAT] >= carlocations[START_LAT] && Meeting[START_LONG] >= carlocations[PARKED_LAT] && Meeting[START_DATE] <= carlocations[END_TIME] && Meeting[END_DATE] >= carlocations[START_TIME] ) ,Meeting[ID])

return _1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-cazheng-msft
Community Support
Community Support

Hi @andrieskoo 

 

You may try this Measure.

IsMeeting = 
VAR Table_ =
    SELECTCOLUMNS (
        Meetings,
        "ID",Meetings[ID],
        "START_DATE", Meetings[START_DATE]/*,
        "END_DATE", Meetings[END_DATE],
        "START_LAT_", Meetings[START_LAT],
        "START_LONG_", Meetings[START_LONG],
        "START_TIMESTAMP", Meetings[ START_TIMESTAMP]*/
    )
VAR midTable=
    CROSSJOIN ( Table_, CarLocations )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Meetings[ID] ) /*MAX(Meetings[ID])*/,
        FILTER (
            midTable,
            [START_DATE] > 'CarLocations'[PARKED_TIME]
                && [START_DATE] < 'CarLocations'[START_TIME]
        )
)

 

Then, the result should look like this.

vcazhengmsft_0-1644480936565.png

Also, attached the pbix file as reference.

 

Best Regards,

Community Support Team _ Caiyun

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi @andrieskoo 

 

You may try this Measure.

IsMeeting = 
VAR Table_ =
    SELECTCOLUMNS (
        Meetings,
        "ID",Meetings[ID],
        "START_DATE", Meetings[START_DATE]/*,
        "END_DATE", Meetings[END_DATE],
        "START_LAT_", Meetings[START_LAT],
        "START_LONG_", Meetings[START_LONG],
        "START_TIMESTAMP", Meetings[ START_TIMESTAMP]*/
    )
VAR midTable=
    CROSSJOIN ( Table_, CarLocations )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Meetings[ID] ) /*MAX(Meetings[ID])*/,
        FILTER (
            midTable,
            [START_DATE] > 'CarLocations'[PARKED_TIME]
                && [START_DATE] < 'CarLocations'[START_TIME]
        )
)

 

Then, the result should look like this.

vcazhengmsft_0-1644480936565.png

Also, attached the pbix file as reference.

 

Best Regards,

Community Support Team _ Caiyun

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

andrieskoo
Frequent Visitor

@amitchandak unfortunately there is no relation between the tables = (
I thought to search for each trip if there is a meeting that started after the end of the trip and ended before the next trip and then check if the GPS data is the same.
but I do not know how to do it

andrieskoo_0-1644349918821.png

 

amitchandak
Super User
Super User

@andrieskoo , a new column in table carlocations 

 

new column =

var _1  = countx(filter(Meeting, Meeting[START_LONG] >= carlocations[START_LONG] && Meeting[START_LONG] >= carlocations[PARKED_LONG] && Meeting[START_LAT] >= carlocations[START_LAT] && Meeting[START_LONG] >= carlocations[PARKED_LAT] && Meeting[START_DATE] <= carlocations[END_TIME] && Meeting[END_DATE] >= carlocations[START_TIME] ) ,Meeting[ID])

return _1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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