Forum Discussion

KevinTWG's avatar
KevinTWG
New Member
3 years ago
Solved

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

  • 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

2 Replies

  • 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