Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX for negative date value

I have two measures that we are currenlty using for date ranges. We have a scenario that was missed, where an end date is earlier than the start date. I've tried a couple of things already. Just need...
  • Anonymous's avatar
    Anonymous
    5 years ago

    this post was helpful, but I didn't use the proposed solution because I ended up altering the existing Switch statement when I realized the last line was just a catch all for all that was left: 

     

    From: 

    AND ([NameOfMeasure]>=91,[NameOfMeasure]<=120),"91-120","121+")

     

    To: 

    ,AND ([NameOfMeasure]>=91,[NameOfMeasure]<=120),"91-120"
    ,AND ([NameOfMeasure]>=121,[NameOfMeasure]<=1000000),"121+")