Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I have the below table:
The concept is:
If the "last update" date is less than a week from today then return the text in "Summary" column, otherwise return "No updates".
Also if the text in "Summary" is empty return "No udpates".
Outcome should look like this
Thanks in advance
Solved! Go to Solution.
I am a bit closer now
NewSummary = IF(ISBLANK('Table'[Summary]),"No updates", if('Table'[Last Update]>=TODAY()-7,'Table'[Summary],"No updates"))
yes both [Summary] and [NewSummary] are columns
Maybe this way, with TODAY()-7....
Summary =
IF(
Table[Last Update] = TODAY()-7
, "Match"
, "no match")
Result:
Thanks for the feedback. It's a bit different the outcome
You need to investigate the DAX IF function:
IF function (DAX) - DAX | Microsoft Learn
TODAY function (DAX) - DAX | Microsoft Learn
You will need a nest IF for this, one to deal with comparing the Dates, and another for comparing the blank. Optionally, you could make BOTH compares with a single statement using the DAX OR operator.
Sure, we could write it out for you, but I encourage you to investigate adding the logic on your own. Start simple, with one IF statement, say on Date.
IF ( MyDate <= TODAY, <value to show if true>, <value to show if false> )
Proud to be a Super User! | |
Thanks for the guidance
I'm probably missing something here
NewSummary = IF('Table'[Last Update]>=TODAY()-7,'Table'[Summary],if('Table'[Summary]="","No updates"))
You are comparing to an empty string
'Table'[Summary]=""
It is entirely possible that the field is BLANK. If so, use this:
ISBLANK('Table'[Summary]
Oh, and [Summary] is a column, right? Not a Measure?
Proud to be a Super User! | |
I am a bit closer now
NewSummary = IF(ISBLANK('Table'[Summary]),"No updates", if('Table'[Last Update]>=TODAY()-7,'Table'[Summary],"No updates"))
yes both [Summary] and [NewSummary] are columns
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
107 | |
88 | |
76 | |
67 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |