Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
stalerik
Helper II
Helper II

Calculated Column - Current Value minus Previous Value (DirectQuery)

Hello all,

 

I am looking for a method to calculate the difference between the current value and a value in the same row from one hour ago.  I have tried several examples but I get stuck because I am using a DirectQuery connection.  I am also not sure if I should use calculated column or measure but I have been trying for a calculate column.  My table has a DateTime column and a Values column.  Thank you!

1 REPLY 1
SanketBhagwat
Solution Sage
Solution Sage

Hi @stalerik .

I am not sure whether all calculations related to Date/Time are supported in DirectQuery.

In DirectQuery, limited number of DAX functions can be used.

 

Screenshot (115).png

Still you can try creating a measure by allowing unrestricted measures.

Go to File->Options and Settings->Options->Globa->DirectQuery->"Allow unrestricted measures in DirectQuery mode".

 

However this is not recommended as it may send heavy T-SQL scripts.

 

If this post helps, then please mark it as 'Accept as Solution' so that others could find it easily.

Regards,

Sanket Bhagwat.

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.