Forum Discussion
joemac130
10 years agoRegular Visitor
DAX Semantic error
VERY NEW to DAX and trying to work my way through... Need assistance understanding the following error condition... Here is the DAX that I have created which returns the following error - I have ...
- 10 years ago
Are Joe Reporting End Date and Joe Reporting Start Date measures? The error doesn't occur in the case that they are both calculated column. According to the BOL, DATEADD(<dates>,<number_of_intervals>,<interval>), the first parameter <dates> should be a date column, if it is a measure in your case, the error occurs based on my test.
Joe Reporting Start Date :=
DATEADD (
[Joe Reporting End Date],
CALCULATE (
COUNTROWS ( CustomerReportingPeriod ),
FILTER (
ALL ( CustomerReportingPeriod[MonthIndex] ),
CustomerReportingPeriod[MonthIndex]
= MIN ( CustomerReportingPeriod[MonthIndex] )
)
),
MONTH
)
Eric_Zhang
10 years agoMicrosoft Employee
Are Joe Reporting End Date and Joe Reporting Start Date measures? The error doesn't occur in the case that they are both calculated column. According to the BOL, DATEADD(<dates>,<number_of_intervals>,<interval>), the first parameter <dates> should be a date column, if it is a measure in your case, the error occurs based on my test.
Joe Reporting Start Date :=
DATEADD (
[Joe Reporting End Date],
CALCULATE (
COUNTROWS ( CustomerReportingPeriod ),
FILTER (
ALL ( CustomerReportingPeriod[MonthIndex] ),
CustomerReportingPeriod[MonthIndex]
= MIN ( CustomerReportingPeriod[MonthIndex] )
)
),
MONTH
)