Forum Discussion
Issues with Calendar DAX
- 5 years ago
Guys, Thanks
The problem was coming from calendar table as the max date was in last year.
Thanks
It looks like all of your declared variables (todaydate, YearStart etc.) all evaluate to scalar values. Therefore, you can display each of these in a card if you change the variable after your RETURN statement to each of these variables in turn, as suggested.
Change this "result" variable to "todaydate" and put the measure in a card. See if it returns blank. Then change it to "YearStart" and so on. You will then be able to identify if one of your variables is causing the problem within your "Result" variable calculation.
Pete
I chnaged to a measure and followed your advise, Yearstart, Monthstart and Quarterstart gives blank, only todaydate is give me value.
- BA_Pete5 years agoSuper User
Ok. I think there may be a few issues at play here.
1) the STARTOFYEAR() function outputs a table, not a scalar value
2) I'm unclear whether your [Month Year] field contains date values
3) I'm unclear what your variables are meant to achieve i.e. what year (calendar or financial) you are trying to align the first date to
Are you able to share your Dynamic P&L table data at all, at least a small sample of it? Please remove any sensitive data.
Pete
- anwargabr5 years agoHelper I
Yes, I can share.