Skip to main content

Power BI

New

Power Query function for Date Key

Vote (1) Share
Nick Appleby's profile image

Nick Appleby on 03 Feb 2022 14:27:21

A new M function that allows you to enter your 'Date' column name, confirm the way it is formatted ( "DD/MM/YY", "MM/DD/YY" , "DD/MMM/YY" and the versions with CCYY ) and applies the following

(Date.Year( DateColumn )*10000)+(Date.Month( DateColumn )*100) +Date.Day( DateColumn ))

This would then return an int value