Forum Discussion
KL001
4 years agoFrequent Visitor
DAX syntax error introduced on data load
I had previously been loading a small subset of data into my model to carry out calculations. I could refresh the data without any issues. Upon bringing in a larger subset of the data into the model ...
- 4 years ago
yes, your DAX code is likely missing a VAR statement. Please post the full code.
lbendlin
4 years agoSuper User
yes, your DAX code is likely missing a VAR statement. Please post the full code.
- KL0014 years agoFrequent Visitor
It turns out there was a measure floating around within the same table that contained similar code as my calculated column. I must have started to create it on accident as a measure and never removed it after the column was created. I'm still not sure why it didn't present a problem with previous data refreshes. Here is the code, it looks like I just removed the name at some point leaving a rouge return statement:
Var DaysOverdue = today() - Documents[periodic_review_due_date]ReturnSWITCH(TRUE(),DaysOverdue <= 30 && DaysOverdue >= 1, "0 to 30",DaysOverdue <= 60 && DaysOverdue >= 31, "31 to 60",DaysOverdue <= 90 && DaysOverdue >= 61, "61 to 90",DaysOverdue >= 91, "X > 90",BLANK())