| Q: I have integer amount that represents duration in seconds. How can show this amount in format "h:mm:ss"? |
| Written by PowerPivot-Info.com |
| Tuesday, 26 October 2010 23:39 |
|
Q: I have integer amount that represents duration in seconds. How can show this amount in format "h:mm:ss"? A: Create new calculated DAX measure "Duration". Formula for this measure will be: =IF(SUM(Table1[DurationInSec])<60*60,"",FLOOR(SUM(Table1[DurationInSec])/60/60,1) & ":") Now when we use calculate DAX measure "Duration" in our reports we will see result in a form "h:mm:ss". Note: above formula generates short form of "h:mm:ss" were "h:mm" part is optional:
If you always want to see hour and minute part, you should use slightly adjusted DAX formula (measure "Duration Long"): =IF(SUM(Table1[DurationInSec])<60*60,"0:", FLOOR(SUM(Table1[DurationInSec])/60/60,1) & ":") Screenshot:
|
Author articles
- PowerPivot / PowerView Excel Workbook Optimizer
- DAX Studio - Free Excel Add-in
- How to solve issue when PowerPivot for Excel crashes on all workbooks
- Using PowerPivot to analyze web access log in "Combined Log" format (CLF)
- Q: I have integer amount that represents duration in seconds. How can show this amount in format "h:mm:ss"?
Most Popular
- Step by step guide on installing PowerPivot for SharePoint on a single machine
- List of suggested datasets to test PowerPivot
- How to install PowerPivot for Excel and list of know issues
- List of PowerPivot DAX functions with description
- Microsoft Virtual Lab: PowerPivot for Excel 2010 Introduction
- Learning PowerPivot and DAX
- List of PowerPivot DAX functions (short)
- PowerPivot's impact on BI pros?




