I went through the video on the “Calculate Previous Weeks Sales - Advanced DAX in Power BI”
I used the same DAX query:
Previous week raised tickets = VAR Currentweek = SELECTEDVALUE(Dates[Week Number]) VAR CurrentYear = SELECTEDVALUE(Dates[Year]) VAR MAXweeknumber = CALCULATE(MAX(Dates[Week Number]),ALL(dates)) Return SUMX( FILTER(ALL(Dates), IF(Currentweek =1, Dates[Week Number]=MAXweeknumber && Dates[Year]=CurrentYear -1, Dates[Week Number]=Currentweek-1 && Dates[Year]=CurrentYear)), [Created Tickets])
However, it did not work. Please could you help?