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.
I need to calculate the variance between planned days to complete a request and the actual days taken to complete it. Below is a sample from my data :
ID | Planned Start Date | Planned End Date | Actual Start Date | Actual Completion Date | Planned Days | Actual Days | Variance |
101 | 15/07/2020 | 20/07/2020 | 16/07/2020 | 21/07/2020 | 6 | 6 | 0 |
102 | 17/07/2020 | 25/07/2020 | 17/07/2020 | 29/07/2020 | 9 | 13 | 4 |
103 | 20/07/2020 | 30/07/2020 | 23/07/2020 | 11 | |||
104 | 30/07/2020 | 10/08/2020 | 30/07/2020 | 12 | |||
105 | 02/08/2020 | 06/08/2020 | 02/08/2020 | 05/08/2020 | 5 | 4 | -1 |
'Planned days' & 'Actual days' are calculated columns. I am using DATEDIFF to calculate the number of days between the two dates - start date & end date.
Query: If the 'Actual End' date is blank then, how do I get the following results :
Actual days to display a 'blank'.
Variance to display a 'blank'
I am using the following formula for the Variance column :
Solved! Go to Solution.
@Anonymous Try:
Comp Var2 =
IF(
ISBLANK(TestWorkFlow[ActualCompletionDate]),
BLANK(),
SUM(TestWorkFlow[Actual Days])- SUM(TestWorkFlow[Planned Days])
)
@Anonymous , first of check Planned Days and Actual Days should have data type number
Try measure like
sumx(Table,[Planned Days]-coalesce([Actual Days],0))
Sum([Planned Days])-coalesce(Sum([Actual Days]),0)
@Anonymous Try:
Comp Var2 =
IF(
ISBLANK(TestWorkFlow[ActualCompletionDate]),
BLANK(),
SUM(TestWorkFlow[Actual Days])- SUM(TestWorkFlow[Planned Days])
)
Thanks @Greg_Deckler
I had to tweak the formula a bit and it worked.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |