March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All!
I have some columns, which show minutes based on calculation time minus time (end time - start time).
I want to create matrix table showing total minutes during the hours by day:
Is there any way to have dates as columns and hours as rows? To get such result:
Please advice.
Thank you,
G.
Solved! Go to Solution.
@A_a_a Well, perhaps you could move the calculations to PQ and then unpivot. Otherwise, you could potentially use this: DAX Unpivot - Microsoft Power BI Community. Last thought, create a disconnected table that just lists your times like:
Time
0:00
1:00
2:00
Use this for your rows. Create a measure like this:
Measure =
VAR __Time = MAX('DisconnectedTable'[Time])
VAR __Result =
SWITCH(__Time,
"0:00", SUM('Table'[0:00]),
"1:00", SUM('Table'[1:00]),
"2:00", SUM('Table'[2:00]),
...
)
first I have created this data and you would need to create a calculated table or use DAX measures to generate the desired result.
Hope you get this helpful.
@A_a_a In Power Query Editor, try unpivoting your time columns.
Thank you for your message.
I don't think I can unpivot them because they are not in power query editor, the columns are added in Data View.
What do you think?
Thanks,
G.
@A_a_a Well, perhaps you could move the calculations to PQ and then unpivot. Otherwise, you could potentially use this: DAX Unpivot - Microsoft Power BI Community. Last thought, create a disconnected table that just lists your times like:
Time
0:00
1:00
2:00
Use this for your rows. Create a measure like this:
Measure =
VAR __Time = MAX('DisconnectedTable'[Time])
VAR __Result =
SWITCH(__Time,
"0:00", SUM('Table'[0:00]),
"1:00", SUM('Table'[1:00]),
"2:00", SUM('Table'[2:00]),
...
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |