Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How do I make a visualization where Times duration is in hours instead of a text string?
I need it to be an integer so I can total the hours for each Student.
Desired result looks like...
Blake: 2
Christianson: 4
Solved! Go to Solution.
Hi,
According to your description, I create a table to test:
Please take following steps:
1)Use ‘Split Column’ function in Query Editor:
And it shows:
2)Then, add a custom column:
3)After Close&Apply, transfer column [TimeDuration] format to ‘Decimal number’:
4)Create a measure to calculate each student’s time duration:
TimeDuration of each student = CALCULATE(SUM('Table'[TimeDuration]),ALLEXCEPT('Table','Table'[Student Name]))
5)The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
Hi,
According to your description, I create a table to test:
Please take following steps:
1)Use ‘Split Column’ function in Query Editor:
And it shows:
2)Then, add a custom column:
3)After Close&Apply, transfer column [TimeDuration] format to ‘Decimal number’:
4)Create a measure to calculate each student’s time duration:
TimeDuration of each student = CALCULATE(SUM('Table'[TimeDuration]),ALLEXCEPT('Table','Table'[Student Name]))
5)The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
Hello Giotto,
Thank you for your time and effort. Great explanation, it helped!
I would open Query Editor, select your Times column and split by delimiter of " - ".
Rename the columns to start time and end time, respectively.
Then add a new column subtracting end time from start time.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |