Forum Discussion

podma's avatar
podma
Regular Visitor
2 years ago
Solved

no valid "dates" in data model

Dear all,   I face the issue that there's no valid date in my data model.   Data source is Python and I'm not allowed to make any changes there. The column that contains data information has the...
  • bhanu_gautam's avatar
    2 years ago

    podma , Create a new calculated column using the below DAX

    ValidDate =
    VAR YearPart = LEFT('YourTable'[DateText], 4)
    VAR MonthPart = RIGHT('YourTable'[DateText], 2)
    RETURN
    DATE(YearPart, MonthPart, 1)