Forum Discussion

markoB's avatar
markoB
New Member
1 year ago
Solved

Problem with DATESBETWEEN that has a variable inside

Hi DAX gurus, I'm having some troubles making DAX run as intended, i've spent a couple of days of testing quite a few things and can't get it to work, worst part is that separately (debbuging) eve...
  • johnt75's avatar
    johnt75
    1 year ago

    This is a lot to take in ğŸ˜€.

    I would start by creating 2 measures to return the desired start and end dates based on the slicer selection. You can then put these into a table / matrix visual and see what they are returning, and you can also use them within the YTD calculation. That will allow you to determine where the underlying issue is - either the calculation of the dates, or applying those dates as filters.

    Once you've identified the problematic code, post the definition of the measure and a screenshot of the model relationships, ideally highlighting tables which are used for slicers so that we can get an overall picture of what is going on.