Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I need to convert the below Calculated column (in Dax) to custom column (In M Query). Kindly help.
Duration =
var __currentCreator = 'Build routing'[Creator]
var __currentRouting = 'Build routing'[Unit Status]
var __currentDate = 'Build routing'[Date]
var __currentTime = 'Build routing'[End Time]
var __previousTime =
MAXX(
FILTER(
'Build routing',
'Build routing'[Creator] = __currentCreator
&& 'Build routing'[Date] = __currentDate
&& 'Build routing'[Unit Status] = __currentRouting
&& 'Build routing'[End Time] < __currentTime
),
'Build routing'[End Time]
)
var __timeDiff = DATEDIFF(__previousTime, __currentTime, SECOND)
var __Duration = IF(__timeDiff>360,BLANK(),__timeDiff)
return
__DurationThanks in advance.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 24 | |
| 17 | |
| 11 | |
| 10 |