cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LMeijdam Established Member
Established Member

Re: Multiplication with measure

Hi @v-yuezhe-msft,

 

Yes I do (see pictures below)

When i add timedifference and SpeedM/S it works (although it sums SpeedM/S for every record (that is why it so high))

 

Capture.PNG

 

When I try to add Outputmeasure

Capture2.PNGCapture3.PNG

 

Could the problem be something that the original timelapse had alot of speed records (multiple in one "TimeDifference" ?

Moderator v-yuezhe-msft
Moderator

Re: Multiplication with measure

@LMeijdam,

Could you please share the complete data of your table so that I can test?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LMeijdam Established Member
Established Member

Re: Multiplication with measure

Hi @v-yuezhe-msft,

 

This is what the data of my table looks like (note speed here is still in KM/H,I use a created M/S column)

 

TimeLapseStationaryObjectMSinceSObjectSpeedMovingObject
10:00:00X5070K1
10:10:00X10090K1
10:20:30Y30100K1
10:30:00Y7090K1
10:35:00Y110120K1
10:40:50Z2090K1
10:51:00Z70100K1

 

MSinceSObject represents the amount of meters since the movingobject passed the stationary object, I calculated the exact time the moving object was at the StationaryObject called "TimeAtPoint"

 

From that "TimeAtPoint" we wanted to know the average so that made

AverageTimeAtPoint = 
    CALCULATE(
            AVERAGE(Table1[TimeAtPoint]);
            ALLEXCEPT(Table1;Table1[StationaryObject])
)

 

the last thing I want to know is the distance between the stationary points.

 

L.Meijdam

Moderator v-yuezhe-msft
Moderator

Re: Multiplication with measure

@LMeijdam,

What formula do you use to create TimeAtPoint? Could you please post expected result based on the above complete data? Do you want to calculate the distance between different Stationary Objects or the distance between same Stationary Objects that have different TimeLapse?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LMeijdam Established Member
Established Member

Re: Multiplication with measure

@v-yuezhe-msft,

 

I used this formula to create TimeAtPoint:

 

TimeAtPoint = 
	Table1[TimeLapse]-Table1[TravelTimeTformat]

(traveltime is the time the movingobject took from the stationaryobject to its current location)

 

My expected result is to have a slicer where I can click on for example Z and X (StationaryObject) and then see the distance between those two objects in a card.

 

 

Moderator v-yuezhe-msft
Moderator

Re: Multiplication with measure

@LMeijdam,

What is the TIME column you used in the following formula? If the TIME column is AverageTimeAtPoint column, please show us the data of the TravelTimeTformat column.

TimeDifference =Max(Table1[TIME]) - MIN(Table1[TIME])

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LMeijdam Established Member
Established Member

Re: Multiplication with measure

@v-yuezhe-msft,

 

As suggested earlier in this post I created a calculated column with the following formula:

 

time = 
	MINUTE(Table1[AverageTimeAtPoint])*60+SECOND(Table1[AverageTimeAtPoint])

So in the Timedifference code that looks like this:

 

TimeDifference = 
	MAX(Table1[time])-MIN(Table1[time])

 

 

 

Moderator v-yuezhe-msft
Moderator

Re: Multiplication with measure

@LMeijdam,

In your table, you have different SpeedM/S for different Stationary Objects. You would need to create a measure to calculate a average speed value, then calculate distance between objects.

TimeDifference = MAX(Table1[time])-MIN(Table1[time])

AverageSpeed = AVERAGE(Table1[SpeedM/S])

OutputMeasure = [TimeDifference]*[AverageSpeed]

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LMeijdam Established Member
Established Member

Re: Multiplication with measure

Hi @v-yuezhe-msft,

 

Thank you very much for your time it finally works like expected ! Smiley Happy

 

Have a very good day !

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 68 members 990 guests
Please welcome our newest community members: