The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
This is what my table looks like before filtering by any person to see how many hours they worked.
After filtering by a person that worked from 12am to 8am on a particular date, lets say 02/11/2024 here is what I have
((Total of 8hrs in the 12AM Column).
The challenge I have is that I want the entire 8 hours to be spread across from 12am to 8am something like this. i created this in word for better illustration
Hi lbendlin ,thanks for the quick reply.
Hi lamlamm24 ,
Please follow these steps:
1. Use the following DAX expression to create a table
Table = GENERATESERIES(TIME(1,0,0),TIME(8,0,0),TIME(1,0,0))
2. Use the following DAX expression to create a column(‘HourSupply’: Sum of hours worked after filtering with clinicians on specific dates, I'm assuming a figure of 8.)
Column = DIVIDE([HourSupply] ,8)
3.Use the following DAX expression to create a column
Column2 = SWITCH(TRUE(),
[Value] = TIME(1,0,0),"12am-12:59am",
[Value] = TIME(2,0,0),"1am-1:59am",
[Value] = TIME(3,0,0),"2am-2:59am",
[Value] = TIME(4,0,0),"3am-3:59am",
[Value] = TIME(5,0,0),"4am-4:59am",
[Value] = TIME(6,0,0),"5am-5:59am",
[Value] = TIME(7,0,0),"6am-6:59am",
[Value] = TIME(8,0,0),"7am-7:59am"
)
4.Final output
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
102 | |
82 | |
62 | |
56 |
User | Count |
---|---|
254 | |
119 | |
115 | |
100 | |
76 |