cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
moeconsult Helper V
Helper V

IF difference between startdate and updated date >

I have the excel formula working but I need help with the dax version of it,

 

=IF(F2="",A2,IF(AND((D2-F2)>2,E2="Cancelled"),0,A2))

 

Sample Data below:

    A           B                          C                      D                         E                   F                                  G

feeDateEnddateStartdateStatusUpdatedExpectedOutput
£1017/09/2020 16:0015/09/2020 00:0015/09/2020Attended06/04/2020£10.00
£1017/09/2020 16:0016/09/2020 18:0016/09/2020Cancelled06/04/2020£0.00
£1017/09/2020 16:0029/06/2020 18:0029/06/2020Cancelled28/06/2020£10.00
£1017/09/2020 16:0017/09/2020 16:0017/09/2020Pending £10.00
£1017/09/2020 16:0030/06/2020 16:0030/06/2020Pending £10.00
£1017/09/2020 16:0015/09/2020 00:0015/09/2020Pending £10.00
£1017/09/2020 16:0016/09/2020 18:0016/09/2020Pending £10.00
£1017/09/2020 16:0029/06/2020 18:0029/06/2020Pending £10.00
£1017/09/2020 16:0017/09/2020 16:0017/09/2020Pending £10.00
£1017/09/2020 16:0030/06/2020 16:0030/06/2020Pending £10.00
£1017/09/2020 16:0015/09/2020 00:0015/09/2020Pending £10.00
£1017/09/2020 16:0016/09/2020 18:0016/09/2020Pending £10.00
£1017/09/2020 16:0029/06/2020 18:0029/06/2020Pending £10.00
£1017/09/2020 16:0017/09/2020 16:0017/09/2020Pending £10.00
£1017/09/2020 16:0030/06/2020 16:0030/06/2020Pending £10.00
£1017/09/2020 16:0015/09/2020 00:0015/09/2020Pending £10.00
£1017/09/2020 16:0016/09/2020 18:0016/09/2020Pending £10.00
£1017/09/2020 16:0029/06/2020 18:0029/06/2020Pending £10.00
£1017/09/2020 16:0017/09/2020 16:0017/09/2020Pending £10.00
£1017/09/2020 16:0030/06/2020 16:0030/06/2020Pending £10.00
       
       
       
       
       
       
2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User II
Super User II

Re: IF difference between startdate and updated date >

Hi @moeconsult 

try

Column = 
IF(ISBLANK([Updated]), [fee],
 IF([Status]="Cancelled" && ([Startdate] - [Updated]) > 2, 0, [fee])
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

camargos88 Community Champion
Community Champion

Re: IF difference between startdate and updated date >

Hi @moeconsult ,

 

Try this custom column:

 

C = IF('Table (2)'[Update] = BLANK(); 'Table (2)'[fee]; IF('Table (2)'[Start Date] - 'Table (2)'[Update] > 2 && 'Table (2)'[Status] = "Cancelled"; 0; 'Table (2)'[fee]))
 
Ricardo

Did I answer your question? Mark my post as a solution!
Ricardo

View solution in original post

2 REPLIES 2
Super User II
Super User II

Re: IF difference between startdate and updated date >

Hi @moeconsult 

try

Column = 
IF(ISBLANK([Updated]), [fee],
 IF([Status]="Cancelled" && ([Startdate] - [Updated]) > 2, 0, [fee])
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

camargos88 Community Champion
Community Champion

Re: IF difference between startdate and updated date >

Hi @moeconsult ,

 

Try this custom column:

 

C = IF('Table (2)'[Update] = BLANK(); 'Table (2)'[fee]; IF('Table (2)'[Start Date] - 'Table (2)'[Update] > 2 && 'Table (2)'[Status] = "Cancelled"; 0; 'Table (2)'[fee]))
 
Ricardo

Did I answer your question? Mark my post as a solution!
Ricardo

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors