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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
KevinTWG
New Member

Help with DAX daily flow calculation Measure

Hi ,

 

I have an data table that stores Share ID, Date, Qty and Value. I am trying to calculate the daily flows (originaly in excel). The data holds several months on data and I need to do this per month.

 

daily flows = (Share Qty(Date) - Share Qty (Date - 1 day)) * Share value( Date) / Share Qty ( Date -1 )

 

any ideas?

 

Kev

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @KevinTWG ,

 

I recommend reading this article: https://www.daxpatterns.com/time-patterns/
This article contains almost everything one needs to know regarding time/date related calculations.

This article also explains why creating a data model with a dedicated calendar table is crucial for the data model.

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey @KevinTWG ,

 

I recommend reading this article: https://www.daxpatterns.com/time-patterns/
This article contains almost everything one needs to know regarding time/date related calculations.

This article also explains why creating a data model with a dedicated calendar table is crucial for the data model.

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks Tom, just reading it now

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.