Forum Discussion
Anonymous
4 years agoNot applicable
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...
- 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/
Syk
Resident Rockstar
4 years agoThe datediff function should work for you! Try this out for creating a new column with dax
WeekDiff =
DATEDIFF(today(),'Table'[Date],WEEK)