Forum Discussion
Dynamic Calculation Based on Date
- 4 years ago
Anonymous DAX can do all the work that relationships do, so if you want to pick up all data between dates, you don't actually need any relationship. Seems really counter-intuitive, but it works.
Other option is to keep the relationship between Date and Fact table, but then need to use the ALL or similar function (such as DATESBETWEEN ) to ensure that the relationship doesn't restrict you to only seeing the date that is selected. As you have pointed out, it all comes down to using the right date in the right place in the DAX formulas.
Feel free to mark your most recent post as a solution, as it looks like you've solved this now?
Anonymous DAX can do all the work that relationships do, so if you want to pick up all data between dates, you don't actually need any relationship. Seems really counter-intuitive, but it works.
Other option is to keep the relationship between Date and Fact table, but then need to use the ALL or similar function (such as DATESBETWEEN ) to ensure that the relationship doesn't restrict you to only seeing the date that is selected. As you have pointed out, it all comes down to using the right date in the right place in the DAX formulas.
Feel free to mark your most recent post as a solution, as it looks like you've solved this now?
Thank you for the thourough explanation, I am going to try the way you suggested so that I can fully understand both options.
Marking your explanation as the answer seeing that it provides a broader level of insight which would be helpful for any other users who have a similar question vs my problem specific answer! Thanks again!