Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I need to compare two dates (completion date & target date) and calculate a % of items that were completed within the set target date.
My data looks like below :
Item # | Completion date | Target Date |
1 | 15/08/2020 | 20/08/2020 |
2 | 17/08/2020 | 15/08/2020 |
3 | 20/08/2020 | 20/08/2020 |
4 | 23/08/2020 | 20/08/2020 |
The data type for both the date columns is set to date.
If the completion date is less than or equal to the target date, then display Met else Not met. Then calculate a % of the total items that met the SLA.
To compare the two dates and return a value in a calculated column, I am using the 'IF' function, however, I get the following error
Solved! Go to Solution.
@Anonymous , check data type of both columns it should be date and datetime
Also this should be column
SLA = If(TestWorkFlow[ActualCompletionDate]< TestWorkFlow[TargetDate],"Met", "Not met")
Also check for date form dd/mm/yyyy
@Anonymous , check data type of both columns it should be date and datetime
Also this should be column
SLA = If(TestWorkFlow[ActualCompletionDate]< TestWorkFlow[TargetDate],"Met", "Not met")
Also check for date form dd/mm/yyyy
@amitchandak Thanks. It worked. I didn't check the field/data type for one of the dates that's what was causing the error.
@Anonymous - I think you want something like Open Tickets - https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364#M147
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |