Forum Discussion

igrandey89's avatar
igrandey89
Icon for Advocate II rankAdvocate II
5 years ago
Solved

DAX Beginner - Need help with displaying/replacing items depending on the quarter selected.

The end goal of this DAX:

  • Replace “FALSE” with “TBD” for teams with no existing goals (when current or future quarter is selected from slicer).
  • Display TRUE for teams that have existing goals—regardless of the quarter selected (already working).
  • Display FALSE for teams with no existing goals past quarters and do not = current quarter (this is where I am getting stuck ☹)

Here’s what I have currently--no trouble with replacing "False" fields (which are currently formatted as text) with "TBD." 

goalExists =

IF([teams_with_goal]=0, "TBD", TRUE())

 

After this, it's clear that all my False values are replaced with TBD.

 

For reference, this is the teams_with_goal measure:

teams_with_goal =

CALCULATE(

    DISTINCTCOUNT(SquadTeams[Id]) +0,

    ALLNOBLANKROW('SquadHealthCheckGoal'[ID])

)

 

After creating the above measure, I was able to duplicate/change the column type to text and replaced with True/False. That being said, I can't seem to wrap my head around only replacing the "False" values for current or future months

Any insight is greatly appreciated 🙂

  • Try not to mix field types in your results. Oftentimes DAX will actually prevent you from doing that.  In this scenario you should stick with all text values, ie "FALSE","TBD","TRUE" etc.

     

    Learn about functions like ISBLANK() and COALESCE()

2 Replies

  • Try not to mix field types in your results. Oftentimes DAX will actually prevent you from doing that.  In this scenario you should stick with all text values, ie "FALSE","TBD","TRUE" etc.

     

    Learn about functions like ISBLANK() and COALESCE()

    • igrandey89's avatar
      igrandey89
      Icon for Advocate II rankAdvocate II

      Appreciate your response---I'm going to work on it this week with a fresh mind!