Forum Discussion
Convert 24 HR time
- 10 years ago
The first formula I supplied is DAX. That is the one that starts with "Column =". You use that version after you have run your query and are out of the Query Editor window and in Power BI Desktop. You go to the Data tab (middle icon on the left) and go to "Modeling" and then "New Column". That is where you would use the FIRST formula.
The SECOND formula is when you are in the Query Editor window and go to "Add Column" in the ribbon and then New Column. You seem to be using the DAX query when you should be using the M query and using the M query when you should be using the DAX query.
The first formula I supplied is DAX. That is the one that starts with "Column =". You use that version after you have run your query and are out of the Query Editor window and in Power BI Desktop. You go to the Data tab (middle icon on the left) and go to "Modeling" and then "New Column". That is where you would use the FIRST formula.
The SECOND formula is when you are in the Query Editor window and go to "Add Column" in the ribbon and then New Column. You seem to be using the DAX query when you should be using the M query and using the M query when you should be using the DAX query.
For the first I receive the following error:
An argument of function 'LEFT' has the wrong data type or has an invalid value.
What's the difference beteen DAX and M?
- Greg_Deckler10 years agoCommunity Champion
What is the data type of your "Time" column? Is your Time column called "Time"? I tested with the Time column being Whole Number and Text.
The difference between DAX and M are that they are two completely different languages. DAX is used with PowerPivot (the in-memory data model that Power BI uses). M is used with Power Query, the extract, transform and load (ETL) system that Power BI uses.
- Anonymous10 years agoNot applicable
Whole Number for both.
- Greg_Deckler10 years agoCommunity Champion
Try switch [ACTUAL_TIME] to Text, it is the ?Data Type" drop down. Weird. If that doesn't work, copy and paste your formula into a response so that I can copy and paste it exactly and recreate this.
- Anonymous10 years agoNot applicable
I'll worry about it later. You're second query worked so I'll just work off that. Thank you!