Forum Discussion
Divide Measure by its Max value
- 4 years ago
Hi Anonymous ,
How about this:
ID 11 has the maximum speed, which is why the measure shows 1.
This is the measure I used:
Speed 1 mes = VAR _helpTable = SUMMARIZE ( ALLSELECTED ( Table2 ), [ID], "speed", [speed1] ) VAR _maxSpeed = CALCULATE ( MAXX ( _helpTable , [speed] ) ) RETURN DIVIDE ( Table2[Speed1], _maxSpeed )Hope this is it!
/Tom
https://www.instagram.com/tackytechtom
tackytechtomThanks for helping. It is giving 1 as an answer for all rows. It is not giving correct output.
- tackytechtom4 years agoMost Valuable Professional
I am not sure what the ID in your model does, so it might work if you remove the 'Table'[ID] in the SUMMARIZE function. Otherwise, you are welcome to share some data and show a possible outcome of what you would like to achieve 🙂
/Tom
- Anonymous4 years agoNot applicable
tackytechtom Thanks for answering. I am sharing the details.
Time = (DATEDIFF('Table1'[start time], 'Table1'[end time],SECOND))Speed1 = SUM(Table2[Volume])/sum(Table1[Time])Speed 1 col = DIVIDE(Table2[Volume], SUM(Table1[Time]))These are two tables linked with each other on ID.If I divide columns as measure, it gives correct answer. But when I divide it as calculated column, answer is not correct.I just wanted to divide the speed with max speed. Thanks in advance!- tackytechtom4 years agoMost Valuable Professional
Hi Anonymous ,
How about this:
ID 11 has the maximum speed, which is why the measure shows 1.
This is the measure I used:
Speed 1 mes = VAR _helpTable = SUMMARIZE ( ALLSELECTED ( Table2 ), [ID], "speed", [speed1] ) VAR _maxSpeed = CALCULATE ( MAXX ( _helpTable , [speed] ) ) RETURN DIVIDE ( Table2[Speed1], _maxSpeed )Hope this is it!
/Tom
https://www.instagram.com/tackytechtom
- Anonymous4 years agoNot applicable