The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
1. I need a dax measure that will return the items in the blue based on the duration and first half, if first half is PR, the measure should return 12, otherwise, it should return what is in first half column. In this measure, day 6 and 7 should return blank.
2. for the second measure, i want a dax that will count the number of days John Doe is at work contineously, and for day 6 and 7 return 12. It should aonly return the 12 for day 6 and 7
expected output
@Selded Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Hello Greg,
1. Sample data as shown in table below
2. Calculated column, if firsthalf=PR, return 12, otherwise return first half
3. Calculated measure to return same as calculated column.
4. i want a dax that will count the number of days John Doe is at work contineously, and for day 6 and 7 return 12. It should aonly return the 12 for day 6 and 7
Below is the data sample
UserID | PDate | UserName | Status | WorkingShift | Shift Duration | Calculated colum |
TT2S027 | 17/09/2024 0:00 | JESSY MATT | PR | RD | 12 | 12 |
TT2S027 | 18/09/2024 0:00 | JESSY MATT | AL | RD | 0 | RD0 |
TT2S027 | 19/09/2024 0:00 | JESSY MATT | PR | DS | 0 | AL |
TT2S028 | 20/09/2024 0:00 | JESSY MATT | ML | DS | 0 | ML |
TT2S026 | 18/09/2024 0:00 | LUKE KATE | ML | NS | 0 | ML |
TT2S028 | 19/09/2024 0:00 | ASHLEY MOORE | ML | NS | 0 | ML |
TT2S029 | 20/09/2024 0:00 | MARK COOK | ML | NS | 0 | ML |
TT2S028 | 17/09/2024 0:00 | JOHN DOE | PR | DS | 12 | 12 |
TT2S028 | 18/09/2024 0:00 | JOHN DOE | PR | DS | 12 | 12 |
TT2S028 | 19/09/2024 0:00 | JOHN DOE | PR | DS | 12 | 12 |
TT2S028 | 20/09/2024 0:00 | JOHN DOE | PR | DS | 12 | 12 |
TT2S028 | 21/09/2024 0:00 | JOHN DOE | PR | NS | 12 | 12 |
TT2S028 | 22/09/2024 0:00 | JOHN DOE | PR | NS | 12 | 12 |
TT2S028 | 23/09/2024 0:00 | JOHN DOE | PR | NS | 12 | 12 |
TT2S028 | 24/09/2024 0:00 | JOHN DOE | PR | NS | 12 | 12 |
TT2S028 | 25/09/2024 0:00 | JOHN DOE | RD | RD | 0 | RD |
TT2S028 | 26/09/2024 0:00 | JOHN DOE | RD | RD | 0 | RD |
TT2S028 | 27/09/2024 0:00 | JOHN DOE | RD | RD | 0 | RD |
TT2S028 | 28/09/2024 0:00 | JOHN DOE | RD | RD | 0 | RD |
TT2S028 | 29/09/2024 0:00 | JOHN DOE | PR | DS | 12 | 12 |
TT2S028 | 30/09/2024 0:00 | JOHN DOE | AL | DS | 0 | AL |
TT2S028 | 01/10/2024 0:00 | JOHN DOE | AL | DS | 0 | AL |
TT2S028 | 02/10/2024 0:00 | JOHN DOE | AL | DS | 0 | AL |
TT2S028 | 03/10/2024 0:00 | JOHN DOE | AL | DS | 0 | AL |
12 |
User | Count |
---|---|
27 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
33 | |
14 | |
11 | |
9 | |
8 |