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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

If date is today return text string from custom column

Newbie here with simple newbie question(s).

Have table with custom column...

table_example.PNG

Want to display, in a Card visual, the string in [Today's Objective] column that corresponds with today's date, if today's date = one of the date's listed in the [Date] column. Trying IF, LOOKUPVALUE, etc but stuck. Is this a job for FILTER? This definitely doesn't work... 

Today's Class = 
IF(TODAY()<MIN('Member25'[Date]),"This course begins on...",
IF(TODAY()>MAX('Member25'[Date]),"This course has ended.",
LOOKUPVALUE('Member25'[Date],'Member25'[Today's Objective],[Today's Objective])
)
)

 Also wondering:

  1. Do I need the custom column?
  2. How to add MIN('Member25'[Date]) to the end of the first return string.

Thanks in advance!

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

here is an example for concatenating strings which falls in a specific date:

The title of the card uses conditional formatting. Create a measure which holds the titel string.

 

19-04-_2021_23-34-07.pngWith kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

 

 

 

View solution in original post

2 REPLIES 2
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

here is an example for concatenating strings which falls in a specific date:

The title of the card uses conditional formatting. Create a measure which holds the titel string.

 

19-04-_2021_23-34-07.pngWith kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

 

 

 

Anonymous
Not applicable

Excellent! Thx @FrankAT 
This is what I did with the example...

Today's Theme = 
IF(TODAY()<MIN('Member25'[Date]),
VAR _FirstDay = FILTER('Member25', 'Member25'[Date] = MIN('Member25'[Date]))
RETURN
CONCATENATEX(_FirstDay, "Upcoming: " & 'Member25'[Title]),
IF(TODAY()>MAX('Member25'[Date]),"This course has ended.",
VAR _Today = FILTER('Member25', 'Member25'[Date] = TODAY())
RETURN
     CONCATENATEX(_Today,'Member25'[ClassTitle],", ")
)
)

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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