Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Help with replicating an if statement from Excel to Dax

Hello,

 

I am trying to replicate an excel formula into dax and am having some issues. Here is the excel formula:

 

Excel: =if(start date <= current date, MIN((1/(End Date-Start Date+1)),1),0)

 

I have not found a great way to replicate this. 

 

Thank you!

  • Anonymous Well, as a column that would be:

    IF( [start date] <= TODAY(), MIN(1/([End Date] - [Start Date] + 1),1), 1, 0 )

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Well, as a column that would be:

    IF( [start date] <= TODAY(), MIN(1/([End Date] - [Start Date] + 1),1), 1, 0 )
    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler That column is not returning what it should. I am not sure where to go from here. Sorry for the confusion.

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler I believe I have figured it out. Thank you for your help!