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.
Hi
In the below visual, my source data is as it appears in the upper table, but I need to find a way to manipulate the data so it appears like it does in the lower table.
I need to create a stacked bar chart in power bi as in the example below, and I can do that by using the upper table as a source, but I can not find a way to sort it so that the most billable time is sorted first, then the non-billable, then the absence, but I can only get it to sort by total time. With the lower table as a source this is not a problem.
Can anyone enlighten me as to how I can either transform the upper table to the lower one, or how I can get my desired result from the structure in the upper table?
Solved! Go to Solution.
Hi @Danbert ,
Dummied up a table for you, you will end up with a table like this by selecting the Type Column and Selecting Pivot on the Transform tab. Use Time as the values.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
The picture below shows both the selection for Pivot Column and the resulting table.
Proud to be a Super User!
Hi @Danbert ,
Would you copy and paste your first table right into the message so that we can copy and paste it into Power Query? Cannot do that with pictures.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
Hi @Nathaniel_C , of course, sorry about that. Please see below:
User | TimerLogDuration | JobType | JobTypeID |
John Smith | 50 | Billable | 1 |
Dave Brown | 100 | Non-Billable | 2 |
Mary Jones | 15 | Billable | 1 |
John Smith | 150 | Billable | 1 |
John Smith | 200 | Absent | 3 |
Sally Wood | 27 | Non-Billable | 2 |
Frank Walston | 35 | Billable | 1 |
Sally Wood | 84 | Absent | 3 |
Frank Walston | 94 | Non-Billable | 2 |
Hi @Danbert beat you to it with a dummy table. Let me know if this makes sense.😁
Proud to be a Super User!
Hi @Danbert
Using your table.
Proud to be a Super User!
@Nathaniel_C - that worked perfectly, thanks so much that's saved me a lot of time!
Hi @Danbert ,
You are very welcome, glad to help!
Proud to be a Super User!
@Nathaniel_C, thanks so much for coming back to me so quickly on this. I won't be able to test this until tomorrow but looks exactly like what I'm after. I'll report back tomorrow.
Thanks again.
Hi @Danbert ,
Dummied up a table for you, you will end up with a table like this by selecting the Type Column and Selecting Pivot on the Transform tab. Use Time as the values.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
The picture below shows both the selection for Pivot Column and the resulting table.
Proud to be a Super User!
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 |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |