cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mwatkins2021
Regular Visitor

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
Super User II
Super User II

Hi @mwatkins2021 

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
Super User II
Super User II

Hi @mwatkins2021 

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

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 User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors