Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Como incluir uma coluna personalizada que multiplique uma coluna com valor inteiro por uma coluna de hora? O Excel converte a hora em número serial e multiplica normalmente, mas no power query não estou conseguindo.
Solved! Go to Solution.
Proud to be a Super User! | |
To multiply an integer column by a time column in Power Query, first ensure the time column is in the "time" data type. Then, create a custom column using the formula
= [IntegerColumn] * (Duration.From([TimeColumn]) / #duration(1, 0, 0, 0))
This converts the time column to a duration (fraction of a day) and multiplies it by the integer column. The result will be the integer value multiplied by the equivalent hours from the time column.
It works in Excel because Excel stores times as numbers.
But what is your point of this multiplication in Power Query?
I ask because Power Query does has both a Time data type as well as a Duration data type. In Excel, both are stored as numbers and can be displayed in a variety of methods.
In Power Query, a "time" data type cannot be equal to or greater than 24 hours.
A "duration" data type can be, and can be multiplied by an integer with the result being a duration.
If you are really multiplying a Duration by an integer, then ensure your "time" is a Duration type, and merely multiply it.
Proud to be a Super User! | |
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 11 | |
| 7 | |
| 6 |