Forum Discussion
erhan_79
Post Prodigy
3 years agoDinamically calculating based on per week
hi there i need a dax formula but in power bi , i have an table , that table has two column , one of the column name is "date" and has some dates , and the other column's name is "quantity" , th...
amitchandak
Super User
3 years agoerhan_79 , Try a new column like
Month Week =
var _monthweek = (eomonth([Date],-1)+1) -WEEKDAY((eomonth([Date],-1)+1),2)+1 //monday
var _week = [Date] -WEEKDAY([Date],2)+1 //monday
return
QUOTIENT(DATEDIFF(_monthweek,_week,DAY),7)+1
Convert to text then