Forum Discussion
Time sum per row then column
- 3 years ago
Solution #1: Power Query M (I can show you how)
If you want, I can prepare a solution in Power Query M, so you will recive same information without loading every row in the Power BI (recommended), but if you need every row for some reason then go for solution 2.
Solution #2: DAX Calculated TableSample Agg = SUMMARIZE( 'Sample', 'Sample'[User Name], "Elapsed Time", SUM('Sample'[NP Elapsed Time]), "Elapsed Time Other", SUM('Sample'[NP Elapsed Time Other]), "Total time", SUM('Sample'[NP Elapsed Time]) + SUM('Sample'[NP Elapsed Time Other]) )Don't forget to change this columns from datetime to time only. 🙂
Solution #3: Measures
If you don't want to create a new table. Only calculate values from the oryginal one - use measures.
Elapsed Time = SUM('Sample'[NP Elapsed Time]) Elapsed Time Other = SUM('Sample'[NP Elapsed Time Other]) Elaped Time Total = [Elapsed Time] + [Elapsed Time Other]Don't forget to format this measures to time format. 🙂
Can you post here a sample data so we can copy and pase it into power bi or pbix file with data included? 🙂 It might be only this data that you showed on screen.
Here is the data sample.
| User Name | NP Elapsed Time | NP Elapsed Time Other |
| User1 | 00:24:00 | |
| User1 | 00:45:00 | |
| User1 | 00:11:00 | |
| User2 | 00:16:00 | |
| User2 | 00:22:00 | |
| User2 | 00:24:00 | |
| User2 | 00:28:00 | |
| User2 | 00:30:00 | |
| User2 | 00:36:00 | |
| User2 | 01:00:00 | |
| User2 | 01:05:00 | |
| User2 | 01:30:00 | |
| User2 | 04:40:00 | |
| User 3 | 00:30:00 | |
| User 3 | 00:35:00 | |
| User 3 | 00:40:00 | |
| User 3 | 01:05:00 |
- bolfri3 years ago
Solution Sage
Solution #1: Power Query M (I can show you how)
If you want, I can prepare a solution in Power Query M, so you will recive same information without loading every row in the Power BI (recommended), but if you need every row for some reason then go for solution 2.
Solution #2: DAX Calculated TableSample Agg = SUMMARIZE( 'Sample', 'Sample'[User Name], "Elapsed Time", SUM('Sample'[NP Elapsed Time]), "Elapsed Time Other", SUM('Sample'[NP Elapsed Time Other]), "Total time", SUM('Sample'[NP Elapsed Time]) + SUM('Sample'[NP Elapsed Time Other]) )Don't forget to change this columns from datetime to time only. 🙂
Solution #3: Measures
If you don't want to create a new table. Only calculate values from the oryginal one - use measures.
Elapsed Time = SUM('Sample'[NP Elapsed Time]) Elapsed Time Other = SUM('Sample'[NP Elapsed Time Other]) Elaped Time Total = [Elapsed Time] + [Elapsed Time Other]Don't forget to format this measures to time format. 🙂
- MLax3 years agoNew Member
Thank you so much this worked!