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.
Hello all,
I have a table with timesheet data that my resources fill.
In this table I have a column called actual work which shows the hours spent by my resources and another column called worktype that shows the type of work (e.g. ProjectWork, Vacation, Skillsdevelopement etc.).
I'm trying to create a conditional column that will be exactly the same with the actual work column but where worktype is vacation the actual work will be zero.
example table:
ActualWork WorkType ActualWorkNoVac
3 Project 3
4 Internal 4
5 project 5
8 Vacation 0
2 SkillsDevelopement 2
etc.
I have created the following formula in M
#"Added Conditional Column" = Table.AddColumn(#"PreviousStep", "ActualWorkNoVac", if each [WorkType] <> "Vacation" then [Actual Work] else "0")
This mostly work but for some reason for a few rows (like 5-6 rows) the actualWorkNoVac is not zero but it's the same as actual work even though WorkType is vacation. Is there something wrong with my M formula?
Solved! Go to Solution.
Nevermind I found the error. In my formula I'm actually comparing with the taskID and not with the actual worktype which is text. And for some reason for these few entries the taskId provided by the project server is not the same with the taskId I use in my formula.
So I'll just change the formula and just compare with the work type.
Nevermind I found the error. In my formula I'm actually comparing with the taskID and not with the actual worktype which is text. And for some reason for these few entries the taskId provided by the project server is not the same with the taskId I use in my formula.
So I'll just change the formula and just compare with the work type.
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |