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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi
I have a table that shows when were our machines data updated in format:
09.10.2020 08:10:22
Now I need a new column that shows hold old this is from now. Since it's 8:51 o'clock atm it should give me value:
00:41:15
Tried this but it gives me wrong values:
Diff = DATEDIFF(TODAY(),'POS LaneCurrentState'[LastTransactionDate],MINUTE)
@Anonymous ,
Try like
Diff = DATEDIFF(Now(),'POS LaneCurrentState'[LastTransactionDate],MINUTE)
or
Diff = DATEDIFF('POS LaneCurrentState'[LastTransactionDate],Now(),MINUTE)
Thanks this gives me answer in minutes that I can work with but I also need to be able to do this in M code now.
Tried:
Duration.ToText(DateTime.FixedLocalNow - [LastTransactionDate])
but that doesn't work either:
Expression.Error: We cannot apply operator - to types Function and DateTime.
Details:
Operator=-
Left=[Function]
Right=09.10.2020 08:19:19
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |