Forum Discussion
Sum Dollar value between 2 dates
- 8 years ago
Hi, I made a simple example with your data and a calculated table In this file.
Have fun with DAX!
Alberto Ferrari
http://www.sqlbi.com
Well, at this point I would need to look at the data to understand how you shaped it.
If you have different values for the daily payment, then you will need more rows, at least one for each daily payment. Nevertheless, the best performance and the easiest formula will be if you use M code to change the model to a daily one.
Instead of storing (from, to, dailypayment), increase the number of rows so to have one row for each day when you made the payment, with the amount paid. It can be done pretty easily by using some transformation during ETL and, at that point, your formula becomes a very simple SUM.
I could do it easily, but I would need the model, and you can find a complete solution in that sense in the modeling book, as it is a very common data model. I guess I did it also in the article I linked in an earlier post.
Have fun with DAX!
Alberto Ferrari
http://www.sqlbi.com
Hi Alberto,
Please see attached link to the data model. Let me know if you have any issues opening it.
Regards
Malcolm
- AlbertoFerrari8 years agoMost Valuable Professional
Hi, I made a simple example with your data and a calculated table In this file.
Have fun with DAX!
Alberto Ferrari
http://www.sqlbi.com