Forum Discussion

PatrickByGecko's avatar
4 years ago
Solved

Date problems

      Hello Folks I get a problem with dates comparison or conversion (I don't know). On the dax result panel underneath it is said that it is impossible to convert "avril" from txt to integer. ...
  • AlexisOlson's avatar
    4 years ago

    I can't tell what the problem is but you can make the definitions simpler by taking advantage of EOMONTH.

    VAR _DateDebutMois = EOMONTH ( DateProjet[Dates], -1 ) + 1
    VAR _DateFinMois = EOMONTH ( DateProjet[Dates], 0 )
    VAR _NBJoursMois = DAY ( _DateFinMois )