Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello.
I am at a loss on how to achieve the following agregation of units (by time):
Incidents are stored as unique entries, each with its own timestamp (date and time).
Grouping is a duration metric and Aggregation is Count.
Any directions ?
Solved! Go to Solution.
I was able to figure it out. Dax column with the following conditions:
Duration labels =
//Same Day
IF([Duration Seconds] <= 86400, "Same Day",
// 2 Days
IF ([Duration Seconds] > 86400 && [Duration Seconds] <= 172800, "2 Days",
// 2 - 5 Days
IF ([Duration Seconds] > 172800 && [Duration Seconds] <= 432000, "2 - 5 Days",
// 5 - 7 Days
IF ([Duration Seconds] > 432000 && [Duration Seconds] <= 604800, "5 - 7 Days",
// 1 - 2 Weeks
IF ([Duration Seconds] > 604800 && [Duration Seconds] <= 1.21e+6, "1 - 2 Weeks",
// 2 - 4 Weeks
IF ([Duration Seconds] > 1.21e+6 && [Duration Seconds] <= 2.419e+6, "2 - 4 Weeks",
// 1 - 2 Months
IF ([Duration Seconds] > 2.419e+6 && [Duration Seconds] <= 4.838e+6, "1 - 2 Months",
// > 2 Months
IF ([Duration Seconds] > 4.838e+6, "> 2 Months", "Not Measured"))))))))
Baiscally it asigns a text value to a number (and/or range).
Output is as desired:
I was able to figure it out. Dax column with the following conditions:
Duration labels =
//Same Day
IF([Duration Seconds] <= 86400, "Same Day",
// 2 Days
IF ([Duration Seconds] > 86400 && [Duration Seconds] <= 172800, "2 Days",
// 2 - 5 Days
IF ([Duration Seconds] > 172800 && [Duration Seconds] <= 432000, "2 - 5 Days",
// 5 - 7 Days
IF ([Duration Seconds] > 432000 && [Duration Seconds] <= 604800, "5 - 7 Days",
// 1 - 2 Weeks
IF ([Duration Seconds] > 604800 && [Duration Seconds] <= 1.21e+6, "1 - 2 Weeks",
// 2 - 4 Weeks
IF ([Duration Seconds] > 1.21e+6 && [Duration Seconds] <= 2.419e+6, "2 - 4 Weeks",
// 1 - 2 Months
IF ([Duration Seconds] > 2.419e+6 && [Duration Seconds] <= 4.838e+6, "1 - 2 Months",
// > 2 Months
IF ([Duration Seconds] > 4.838e+6, "> 2 Months", "Not Measured"))))))))
Baiscally it asigns a text value to a number (and/or range).
Output is as desired:
Hello, create a calculated column to group the tgimestamp and use this column + count of lines or IDs
I am looking at the "Same day" "2 Days" "2-5 Days" grouping (tgimestamp was a typo for timestamp)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
69 | |
57 | |
37 | |
36 |
User | Count |
---|---|
83 | |
67 | |
61 | |
46 | |
45 |