I have used a weekly dax measure which you have introduced in one of the Youtube video as follow:-
Cumulative LYYTD-custom Wkly Sales = Var Currentweek= SELECTEDVALUE('Date'[New Week Num]) Var Currentyear= SELECTEDVALUE('Date'[Year-Thurs]) Return calculate([Total sale], filter(all('Date'), 'Date'[New Week Num] = Currentweek && 'Date'[Year-Thurs] = Currentyear - 1 ))
However, when I dragged this measure to canvas, cant display visual and the error message as follow:-
MdxScript(Model) (100, 10) Calculation error in measure ‘Key Measure’[Cumulative LYYTD-custom Wkly Sales]: DAX comparison operations do not support comparing values of type Text with values of type Number. Consider using the VALUE or FORMAT function to convert one of the values.
Please advise what went wrong and how to correct the measure. Thanks.