Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey Folks !!
I have a Table whihc consist following Column:-
VIN (Serial Number of Vehicle)
ENG_HOURS - Engine Hours ( Cumulative Number as per Timestamp)
GPS_Timestamp ( Time and Date when Data Recorded)
I want to Calculate Total Engine Hours For Each VIN over the Selected Pewriod of Time ,
I am Trying to Create a New Column with the Difference of Current Value and Prev valaue for Engine Hours and Then Taking SUM of That Calculated Column to get Exact Engine Hours , I did That in Pyspark , Can we do somethoing in Power BI Directly.
This is The Pyspark COde which i use:-
Regards
Rahul
@rahul632soni , earlier in DAX can help to take diff
new column=
var _max = maxx(filter(Table, [VIN] = earlier([Vin]) && [GPS_Timestamp] < earlier([GPS_Timestamp]) ), [GPS_Timestamp])
return
[ENG_HOURS] - maxx(filter(Table, [VIN] = earlier([Vin]) && [GPS_Timestamp] =_max ), [ENG_HOURS])
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
96 | |
78 | |
72 | |
66 |
User | Count |
---|---|
136 | |
109 | |
104 | |
82 | |
73 |