Forum Discussion
Samarth-Borade
3 years agoFrequent Visitor
Display new Routes compared to Previous month
prev =
var curr= CALCULATETABLE(VALUES(ff[Route Path]),SELECTEDVALUE(ff[Trip Date].[MonthNo]))
var past= CALCULATETABLE(VALUES(ff[Route Path]),DATEADD(ff[Trip Date].[MonthNo],-1,MONTH))
var exc= EXCEPT(curr,past)
return
exc
error:The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
Help me with this
5 Replies
- Mahesh0016Super User
Samarth-Borade try with filter , user below dax query.
prev =var curr= CALCULATETABLE(VALUES(ff[Route Path]),Filter(TabelName,SELECTEDVALUE(ff[Trip Date].[MonthNo])))var past= CALCULATETABLE(VALUES(ff[Route Path]),Filter(TabelName,DATEADD(ff[Trip Date].[MonthNo],-1,MONTH)))var exc= EXCEPT(curr,past)returnexc**If this post helps, please consider accept as solution to help other members find it more quickly and Appreciate your Kudos.- Samarth-BoradeFrequent Visitor
Error!
MdxScript(Model) (39, 59) Calculation error in measure 'ff'[prev]: A column specified in the call to function 'DATEADD' is not of type DATE. This is not supported.- Mahesh0016Super UserExceptdata =VAR Curr = CALCULATETABLE(VALUES(TrainingSample2[Category]),FILTER(TrainingSample2,SELECTEDVALUE(TrainingSample2[SalesDate])))VAR Past = CALCULATETABLE(VALUES(TrainingSample2[Category]),FILTER(TrainingSample2,DATEADD(TrainingSample2[SalesDate],-1,MONTH)))RETURNEXCEPT(Curr,Past)