Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
igrandey89
Advocate II
Advocate II

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

igrandey89_0-1629992486200.png

Any insight is greatly appreciated 🙂

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

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()

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

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()

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

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors