Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to Get Custom Week Desc in DAX

Basis on below data I want to add a calculated column with Week Description I've done it in excel by typing it manually. Also my week is starting from Thursday and ends on Wednesday hence I've Used...
  • VahidDM's avatar
    4 years ago

    Hi Anonymous 

     

    Try this code to add a new column:

    WeekDesc = 
    Var _A = WEEKNUM(today(),14)
    Var _B = WEEKNUM([Date],14)
    Var _C = _B-_A
    return
    if(_B=_A,"This Week","This Week" & _C)

     

    output:

     

     

     

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/