Forum Discussion

music43's avatar
music43
Icon for Advocate II rankAdvocate II
4 years ago
Solved

Stop measure results after a specific date

Hi   I am playing with the PBI Desktop (finance) dummy data to try and learn DAX. I am trying to stop Sales PY measure from returning a result after the last Sale date. I am pretty certain this DAX...
  • tamerj1's avatar
    tamerj1
    4 years ago

    music43 

    Actually with my suggestion you should use MAX ( Date[Date] ) as condition not SELECTEDVALUE. 

    What is happening hear is that SELECTEDVALUE returns blank everywhere while MAX ( Sales[Date] ) returns blank when there is no sale which did the job (blank = blank). But it won't work if you are slicing by Date instead of MonthYear.