Forum Discussion

BGuttmann's avatar
BGuttmann
Regular Visitor
9 years ago
Solved

2 DAX Questions

Hi, I am trying to figure out where I am going wrong with the below DAX Expression    =IF(AND(YEAR([Demand Sent]=YEAR(TODAY())),WEEKNUM([Demand Sent]=WEEKNUM(TODAY())),FORMAT([Demand Sent],"ddd"),"...
  • v-caliao-msft's avatar
    v-caliao-msft
    9 years ago

    Hi BGuttmann,

     

    If you need check the year, you can use YEAR function.
    Column = IF(WEEKNUM(Table1[Date])=WEEKNUM(TODAY())&&YEAR(Table1[Date])=YEAR(TODAY()),,SWITCH(WEEKDAY(Table1[Date]),1,"Sunday",2,"Monday",3,"Tuesday",4,"Wednesday",5,"Thursday",6,"Friday",7,"Saturday"),"Other Week")

     

    And the week is start from Sunday.

     

    Regards,

    Charlie Liao