Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have what I thought was a measure with a simple DATEADD formula and a simple conditional to put in a zero where a blank may exist. It appears to be working for some but not all rows of data, where I have a non-blank value. All the values are from the same table. Approval_Date and Duration are facts. I am clearly missing something basic in my coding logic or my understanding of how the DATEADD function works. Here is the DAX Measure:
Thank you in advance for your help.
Mark
Solved! Go to Solution.
Hi @Anonymous
DATEADD returns a table, not a single value, so you can't use it the way you are trying to
DATEADD function (DAX) - DAX | Microsoft Learn
I'm not following your arithemetic. For example, are you adding 32 days duration to an Approval date of 28 Nov and getting a Close date of 10 July?
To fix this particular issue use this DAX instead
Close Date =
VAR ZeroDuration = IF(ISBLANK(MAXX('FULL PROJECT LIST','FULL PROJECT LIST'[Duration])), 1, (MAXX('FULL PROJECT LIST','FULL PROJECT LIST'[Duration])))
RETURN
SELECTEDVALUE('Full Project List'[Approval Date]) + 7*ZeroDuration
Regards
Phil
Proud to be a Super User!
Hi @Anonymous
DATEADD returns a table, not a single value, so you can't use it the way you are trying to
DATEADD function (DAX) - DAX | Microsoft Learn
I'm not following your arithemetic. For example, are you adding 32 days duration to an Approval date of 28 Nov and getting a Close date of 10 July?
To fix this particular issue use this DAX instead
Close Date =
VAR ZeroDuration = IF(ISBLANK(MAXX('FULL PROJECT LIST','FULL PROJECT LIST'[Duration])), 1, (MAXX('FULL PROJECT LIST','FULL PROJECT LIST'[Duration])))
RETURN
SELECTEDVALUE('Full Project List'[Approval Date]) + 7*ZeroDuration
Regards
Phil
Proud to be a Super User!
Phil,
Worked great. The only think I did differently was add an IF statement to "blank" the value if there is no Approval_Date to start with.
Thank you!
Mark
Phil, Thank you for responding. I will give that a try. Just wanted to clarify that the duration is weeks...which is why I have the multiplier of 7 in there. That is how that Nov 2022 date advances to Jul 2023. I will add a comment to my DAX for clarification.
Thanks.
Mark