Forum Discussion
efilipe
Helper IV
9 years agoIdentify leap day
Hi guys, I have a lot of erros of my CSV file because they have added unexisting dates (leap day). I have to fix it using PowerBI, since I cant touch the CSV file. Any ideas? Thank you! i...
- 9 years ago
I'm not sure exactly what they've added to the data - February 29th for all years?
But you can create a Column in your Calendar to help you identify Leap versus Not Leap Year with this formula
Leap/Not Leap Year = IF ( OR ( MOD ( 'Table'[Year], 400 ) = 0, AND ( MOD ( 'Table'[Year], 4 ) = 0, MOD ( 'Table'[Year], 100 ) <> 0 ) ), "Leap Year", "Not a Leap Year" )Hope this helps! :smileyhappy:
Sean
Community Champion
9 years agoI'm not sure exactly what they've added to the data - February 29th for all years?
But you can create a Column in your Calendar to help you identify Leap versus Not Leap Year with this formula
Leap/Not Leap Year =
IF (
OR (
MOD ( 'Table'[Year], 400 ) = 0,
AND ( MOD ( 'Table'[Year], 4 ) = 0, MOD ( 'Table'[Year], 100 ) <> 0 )
),
"Leap Year",
"Not a Leap Year"
)Hope this helps! :smileyhappy: