Problem with placing the separator/comma

Hi,
I tried to search for this but could not find a similar topic? Since the last update of PBI Im getting error in the DAX code when placing the separator/comma after the requested value. But if I move it infront of the next requested value it works. Has anyone encountered the same problem?

Faulty code
AND (
‘Date’[Date] >= DATE ( 2019, 1, 1 ),
‘Date’[Date] <= DATE ( 2019, 5, 15 )
)

Working code
AND (
‘Date’[Date] >= DATE ( 2019 ,1 ,1 ),
‘Date’[Date] <= DATE ( 2019 ,5 ,15 )
)

Tibbie,

Welcome to the forum. Please post a sample PBIX file so we can better assist. Looking at your question, I don’t see any difference between the Faulty and Working Code.

Thanks
Jarrett

Hi!
Since we don’t have a PBIX sample to see what’s happening exactly. I can tell that it’s due to the space you place before months and days. I think when you place a space before the months 1 and 5 for example, power BI takes the value as ( 5) (it added aspace before the number 5 which does not exist in your date table) instead of (05) or (5) that does exist. Pay attention to the use of space because power BI is very specific.

Just tried to Clean Up and format your code using https://daxcleanup.enterprisedna.co/

Faulty CODE =
    AND (
        ‘ DATE ’[Date] >
         =
            DATE ( 2019, 1, 1 ),
            ‘ DATE ’[Date] <
         =
            DATE ( 2019, 5, 15 )
    )


Working CODE =
    AND (
        ‘ Date ’[Date] >
         =
            DATE ( 2019, 1, 1 ),
            ‘ Date ’[Date] <
         =
            DATE ( 2019, 5, 15 )
    )

Just formatting the code it doesn't seem to be any difference between the two ...

Using https://www.daxformatter.com/ there is an error with the quotes even on the Working Code ...

![image|690x199](upload://teEvulxFH23Vk7J2sldBq5Hkc0S.png)