Forum Discussion
Multiplication with measure
- Anonymous8 years ago
Anonymous,
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
Hi Anonymous,
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)
| TimeLapse | StationaryObject | MSinceSObject | Speed | MovingObject |
| 10:00:00 | X | 50 | 70 | K1 |
| 10:10:00 | X | 100 | 90 | K1 |
| 10:20:30 | Y | 30 | 100 | K1 |
| 10:30:00 | Y | 70 | 90 | K1 |
| 10:35:00 | Y | 110 | 120 | K1 |
| 10:40:50 | Z | 20 | 90 | K1 |
| 10:51:00 | Z | 70 | 100 | K1 |
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
Anonymous,
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
- Anonymous8 years agoNot applicable
Anonymous,
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 - Anonymous8 years agoNot applicable
Anonymous,
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.
- Anonymous8 years agoNot applicable
Anonymous,
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 - Anonymous8 years agoNot applicable
Anonymous,
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])
- Anonymous8 years agoNot applicable
Hi Anonymous,
Thank you very much for your time it finally works like expected ! :)
Have a very good day !