Help with Excel multiple IF formula converted to DAX

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
915
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have this formula in Excel and I need it rewritten in DAX but I am unsure how to do this. I am very very new to DAX and so far have only been able to do the basics. I hope someone can help!

Excel formula:

Excel Formula:
=IF([@[Date Shipped]]="","",IF([@[Date Exchanged]]="",[@[Date Shipped]]-[@[Date Approved]]+1,[@[Date Shipped]]-[@[Date Exchanged]]+1)-([@[Paused Days (Total)]]*([@[Paused Days (Total)]]<>"")))

My attempt was disastrous and clearly not correct:

Code:
Column = IF(ISBLANK('winnipeg erp_workorder'[Date Shipped]),BLANK(),IF(ISBLANK('winnipeg erp_workorder'[Date Exchanged]),('winnipeg erp_workorder'[Date Shipped]-'winnipeg erp_workorder'[Date Approved])+1),('winnipeg erp_workorder'[Date Shipped]-'winnipeg erp_workorder'[Date Exchanged])+1)-(IF(NOT(ISBLANK('winnipeg erp_workorder'[Paused Days Total],'winnipeg erp_workorder'[Paused Days Total]*'winnipeg erp_workorder'[Paused Days Total]))))

Thank you
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
After looking around online I tried the following but still get an error even though the columns are formatted as Dates with the exception of Paused Days which is whole numbers.
I hope someone can help me with this:

1618334779866.png
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top