Forum Discussion
Date Measure if blank
Hi,
What I want to create is a measure that looks for a date in a named column, if it is blank to run edate(today(),2) if it contains a date return the existing date. I used a similar measure on some work I did a year ago, but it was looking at if it was blank first, I've tried to rearrange and nothing seems to work.
Hi Everyone,
I used some of the information provided and used an internal AI system to find the below DAX operation that worked:
Target End Date 2 =IF(not(isblank(selectedvalue('Support Request'[Completed]))),selectedvalue('Support Request'[Completed]),edate(today(),2))Thank you everyone for the help.
6 Replies
- johnt75Super User
Try
Target End Date = SELECTEDVALUE ( 'Support Request'[EndDate], EDATE ( TODAY (), 2 ) )- howcreechRegular Visitor
Hi johnt75,
that removed the blank items from the report instead of filling in a date 2 months from today. Sorry if my question is not complete, I am still working as a new user of Power BI and struggle with many of the topics.
- AnonymousNot applicable
Hi howcreech ,
You can try the following codeTarget End Date = IF( ISBLANK(SUM('Support Request'[EndDate])), EDATE(TODAY(), 2), SUM('Support Request'[EndDate]) )Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- howcreechRegular Visitor
Hi Albert He,
I tried your solution, but it didn't work either. However, I have tried a combination or yours and johnt75 to get a partial result. What I am struggling with now is that the formula is overwriting the data that exists in some instances. Below is the formula I input:
Target End Date =IF(isblank(selectedvalue('Support Request'[EndDate])),EDATE(TODAY(),2),selectedvalue('Support Request'[EndDate]))I'm not sure what is happening to the list data, but I know the EndDate was the previous name the column had (it currently has the name Target End Date). With this formula I'm hoping to leave the date if it currently exists, if not run the edate formula to add on two months.
- v-karpurapudCommunity Support
Hi howcreech
We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.
If our response was helpful, please mark it as the accepted solution and give a kudos, as this helps other members in community.
Thank You! - howcreechRegular Visitor
Hi Everyone,
I used some of the information provided and used an internal AI system to find the below DAX operation that worked:
Target End Date 2 =IF(not(isblank(selectedvalue('Support Request'[Completed]))),selectedvalue('Support Request'[Completed]),edate(today(),2))Thank you everyone for the help.