'DAX dates query in Python

I am running a DAX query within a Python script (using adodbapi) and would like to extract data from a table (called data) inbetween two dates (the field 'date_created'), however I am getting a syntax error.

tablestring = 'EVALUATE(CALCULATETABLE(Data,DATESBETWEEN(Data[date_created], 01/02/2021,04/02/2021)))'

df = pd.read_sql(tablestring, conn)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source