Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
In the Power Query Editor view (right click a table and select 'Edit Query'), I can select 'Data Type' of my column to 'Duration',
But after 'close & apply', that column become 'Decimal number', I can't select 'Duration' from the Date Type'. And when I create a table to show values of that column, it also shows up as Decimal number.
So how can I set the data type of this column to 'Duration'?
Solved! Go to Solution.
Hi @sacheu ,
It is by design in power bi.
Power Query provides a set of contextual transformations and options based on the data type of the column. These transformations and options occur throughout the Power Query interface, such as on the Transform and Add column tabs and the smart filter options.
Duration:
Represents a length of time, which is converted into a Decimal Number type when loaded into the model. As a Decimal Number type, it can be added or subtracted from a Date/Time field with correct results.
The data types in the model and power query are different, please refer:
About Duration type in power query, you can refer this simliar issue: Purpose of "Duration" datatype in Power Query
If you want to calculate some diff between dates, you can use Datediff() function.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sacheu ,
It is by design in power bi.
Power Query provides a set of contextual transformations and options based on the data type of the column. These transformations and options occur throughout the Power Query interface, such as on the Transform and Add column tabs and the smart filter options.
Duration:
Represents a length of time, which is converted into a Decimal Number type when loaded into the model. As a Decimal Number type, it can be added or subtracted from a Date/Time field with correct results.
The data types in the model and power query are different, please refer:
About Duration type in power query, you can refer this simliar issue: Purpose of "Duration" datatype in Power Query
If you want to calculate some diff between dates, you can use Datediff() function.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |