Forum Discussion

uayan's avatar
uayan
Frequent Visitor
3 years ago
Solved

Find projects over X weeks old

Hello all,

 

I have a dax code already but due to beginnig of the year my dax code failed. I want to find projects over X weeks old. My code looks like below:

VAR a =
    WEEKNUM ( TODAY () )
VAR b =
    IF (WEEKNUM ( 'Table'[Column] ) <= a - 6 ....

How can i solve this issue?
           

  • Hi uayan 

     

    You should work with dates instead of weeks like

    Var a = TODAY()
    var b= TODAY()- (6*7) --weeks * days
    
    IF(Table[Date]<=b,
    

     

    You can also define some kind of reference date for a week

     

    Best regards
    Michael
    -----------------------------------------------------
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Appreciate your thumbs up!
    @ me in replies or I'll lose your thread.

1 Reply

  • Mikelytics's avatar
    Mikelytics
    Icon for Resident Rockstar rankResident Rockstar

    Hi uayan 

     

    You should work with dates instead of weeks like

    Var a = TODAY()
    var b= TODAY()- (6*7) --weeks * days
    
    IF(Table[Date]<=b,
    

     

    You can also define some kind of reference date for a week

     

    Best regards
    Michael
    -----------------------------------------------------
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Appreciate your thumbs up!
    @ me in replies or I'll lose your thread.