Forum Discussion
JEJP
3 years agoNew Member
Formula Date doesn't work
Hello, I have made my Dax formula, but it still gives an error. It says that the An argument of function 'DATE' has the wrong data type or the result is too large or too small. What is wrong with my...
- 3 years ago
Please try
Birthdaynext =
VAR Items =
SUBSTITUTE ( Medewerker[GebrooteDatum], "-", "|" )
VAR TheYear =
YEAR ( TODAY () )
VAR TheMonth =
PATHITEM ( Items, 2 )
VAR TheDay =
PATHITEM ( Items, 1 )
VAR ThisYearX =
IFERROR ( DATE ( TheYear, TheMonth, TheDay ), BLANK () )
VAR NextYearX =
IFERROR ( DATE ( TheYear + 1, TheMonth, TheDay ), BLANK () )
RETURN
IF ( TODAY () > ThisYearX, NextYearX, ThisYearX )
Anonymous
3 years agoNot applicable
Hi JEJP ,
I create a table to test, it works well, could you provide the desensitized example data for me to test.
Column =
VAR _a =
DATE ( YEAR ( TODAY () ), MONTH ( 'Table'[Column1] ), DAY ( 'Table'[Column1] ) )
VAR _b =
DATE ( YEAR ( TODAY () ) + 1, MONTH ( 'Table'[Column1] ), DAY ( 'Table'[Column1] ) )
RETURN
IF ( TODAY () > _a, _b, _a )
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JEJP
3 years agoNew Member
Thank you very much. I already found the solution, but this formula also works!