Calculate average speed in Powerbi using DAX

0 votes

I have information from two cameras: the car number, the camera, and the date time. The first camera is A, while the second is B.

I need to figure out what the average speed was for automobiles that passed both cameras with a passage period of at least 5 minutes and no more than 30 minutes. The cameras are 6 kilometres apart.

Only the nearest car crossing timings for the same car were counted. For the nearest A crossing time, I couldn't find the camera B crossing time.

Diff_time = 
VAR temp =
    TOPN (
        1;
        FILTER (
            'TEST2';
            'TEST2'[license_plate] = EARLIER ( 'TEST2'[license_plate])
                && 'TEST2'[Date_time] < EARLIER ( 'TEST2'[Date_time] ) 
        );
        'TEST2'[Date_time]; DESC
    )
RETURN
    DATEDIFF ( MINX ( temp; 'TEST2'[Date_time] ); 'TEST2'[Date_time]; MINUTE )

[license_plate] is car number.

image

Apr 26 in Power BI by Neha
• 6,260 points
25 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Power BI

0 votes
1 answer

Calculate GB Using DAX in Power BI

Hi, @Vnk You can go through this regarding ...READ MORE

answered Jun 30, 2020 in Power BI by Gitika
• 65,850 points
1,745 views
0 votes
1 answer

Using DAX calculation how to calculate monthly budget till today in power bi Desktop?

You can make use of this: MTD Budget ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,850 points
586 views
0 votes
1 answer

Left Outer Join using DAX in PowerBI.

You can simply write a few measures ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,850 points
816 views
0 votes
1 answer

list reports with calculated percentage in Power BI using dax

Create a Measure called Total Revenue: Total Revenue = SUMX( ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,570 points
747 views
0 votes
1 answer

Calculate Total number of Male & Female in the PowerBI report

To achieve what you are looking for, ...READ MORE

answered Feb 28, 2019 in Power BI by Upasana
• 8,620 points
4,572 views
0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 33,010 points
15,175 views
0 votes
1 answer

Bar chart : Arranging in descending order using data from another chart

Select treemap.  Make it active.  Turn on Visual Interactions ...READ MORE

answered Feb 8, 2019 in Power BI by Upasana
• 8,620 points
222 views
0 votes
0 answers

Setting Row Level Security for multiple of values

I'm trying to build up row-level security ...READ MORE

Apr 26 in Tableau by Neha
• 6,260 points
24 views
0 votes
1 answer

Which one should I choose Tableau or Power BI?

Hi Grim, Both the BI tools - Tableau ...READ MORE

answered Apr 6, 2018 in Tableau by ghost
• 1,790 points
266 views
+3 votes
2 answers

Combine tables in Power BI

You can also achieve this using a ...READ MORE

answered Oct 5, 2018 in Power BI by lina
• 8,220 points

edited Oct 11, 2018 by Kalgi 1,217 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP