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

Re: Multiplication with measure

Hi @bsas @rcspaiva,

 

TimeStationaryObjectSpeedMSMovingObject
10:00:00A20X
10:10:00C20X

 

Timedifference represents the time between StationaryObject A and C for example. So in this case Timedifference would be 00:10:00. the expected outcome would be the distance traveled by the moving object between those points

 

The column "Time" we see here is a calculated column which displays an average of when the MovingObject was at StationaryObject

 

there is also a column with Speed in KMH "SpeedKMH" which is a normal column not a calculated one

 

bsas Member
Member

Re: Multiplication with measure

@LMeijdam

 

What is the format of time you're using?

 

00:10:00 - means 10 min or sec?

LMeijdam Established Member
Established Member

Re: Multiplication with measure

Hi @bsas,

 

I am using H:mm:ss

bsas Member
Member

Re: Multiplication with measure

@LMeijdam

 

try to use calculated column for time:

time1 = MINUTE('time and speed'[time])*60 + SECOND('time and speed'[time])

than use it in measure.

LMeijdam Established Member
Established Member

Re: Multiplication with measure

Hi @bsas,

 

I am sorry in which measure did you want me to use it ?

 

bsas Member
Member

Re: Multiplication with measure

This is how I turned minutes from your "time" into seconds as number.

 

Untitled.png

rcspaiva Regular Visitor
Regular Visitor

Re: Multiplication with measure

Sorry my delay, but is this answer correct?

 

Capturar.PNG

 

 

Moderator v-yuezhe-msft
Moderator

Re: Multiplication with measure

@LMeijdam,

Create a calculated column using the formula below.
Column = MINUTE(Table1[Time])*60+SECOND(Table1[Time])

Then create the following measures in your table.
TimeDifference = Max(Table1[Column])- MIN(Table1[Column])
OutputMeasure = [TimeDifference]*VALUES(Table1[SpeedMS])
1.JPG

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 @rcspaiva @bsas,

 

I followed the exact steps and the measure that turns time into seconds as a number works perfectly, the problem I have now is that the "outputmeasure" in @v-yuezhe-msft gives the following error when I try to display it in a visual:

 

"Calculation error in measure [outputmeasure]: A table of multiple values was supplied where a single value was expected"

 

the measure itself works but I can't get it to display something ..

 

Regards, L.Meijdam (excuses for the late response)

Moderator v-yuezhe-msft
Moderator

Re: Multiplication with measure

@LMeijdam,

Do you create the table visual as shown in my screenshot? If not, please post the visual you create.

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.

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

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: 44 members 1,053 guests
Please welcome our newest community members: