Forum Discussion
drgrd13
4 years agoHelper I
datediff column -Power bi
Hi
I want to create the same formula in power bi from Excel. But not too sure how to achieve this. the main formula used in Excel in column to DUE is =IF([@PromiseDt]=0,"Uncommitted",[@PromiseDt]-MAX(TODAY(),[@DueDate]))
| DueDate | PromiseDt | to Due |
| 27-Jan-22 | Uncommitted | |
| 01-Feb-22 | 22-Apr-2022 | -5 |
| 17-Apr-22 | 06-May-2022 | 9 |
| 08-Aug-22 | 08-Aug-22 | 0 |
| 12-Oct-22 | 27-Apr-2022 | -168 |
| 17-Apr-22 | 8-May-2022 | 21 |
| 07-Jun-22 | 12-Jul-2022 | 35 |
| 12-Jul-22 | 12-Jul-22 | 0 |
Hi drgrd13
you may Create a new Column
To Due = IF ( ISBLANK ( Table[PromiseDt] ), "Uncommitted", DATEDIFF ( Table[PromiseDt], MAX ( TODAY (), Table[DueDate] ), DAY ) )