locked
DAX IF Time is greater than a value RRS feed

  • Question

  • I'm attempting to put together an IF statement that basically says IF Time To Consume column has a time less than 10min = Less than 10, IF it's equal to 10 and less than 60 than have it read Between 10 to 60, and finally IF greater than 60 min than have it say Greater than 60 min

    I've included a screen shot of what it would look like below. But wouldn't it be something along the lines of =IF([Time to Consume (actual)>10, "Less than 10", IF(same information as before but for the rest.

    Any help would be greatly appreciated.

    Thanks!

    Wednesday, August 31, 2016 10:54 PM

Answers

  • Figured it out and had to stick in an else clause

    =IF([Minutes]>60, "Greater than 60", IF([Minutes]<=10, "Less than 10", "Between 10 to 60"))

    Sunday, September 4, 2016 7:40 AM

All replies

  • Got it partially figured out. First part I had to covert it into minutes from the Time to Consume column.

    By using =MINUTES(Table1[Time to Consume (actual)])

    Which gave me this

    If I can get help on the last bit I'm set so it's reading correctly. Basically anything less than 10 should read less than 10 minutes, if its greater than 10 and less than 60 than return between 10 and 60 minutes in the results column and finally anything greater than 60 have it output 60 minutes or more.

    =IF(Table1[Time in Minutes]>10,"Less Than 10", IF([Time in Minutes]<40, "Greater than 40", IF([Time in Minutes]>60, "Greater than 60")))

    Wednesday, August 31, 2016 11:28 PM
  • Figured it out and had to stick in an else clause

    =IF([Minutes]>60, "Greater than 60", IF([Minutes]<=10, "Less than 10", "Between 10 to 60"))

    Sunday, September 4, 2016 7:40 AM