Forum Discussion
EnderWiggin
Helper I
5 years agoCreate calendar column value based on a criteria
Hi All, I would like to ask your help to create a calendar column (BeforeActualYearMonth) based on the following criteria: If the Calendar[YearMonth] < LoadedAt[YearMonth] then Calendar[BeforeActu...
- Anonymous5 years ago
BeforeActualYearMonth = var CalendarYearMonth = Calendar[YearMonth] // There must be just one value in LoadedAt var LoadedAtYearMonth = SELECTEDVALUE( LoadedAt[YearMonth] ) return if ( CalendarYearMonth < LoadedAtYearMonth, "BeforeActual", // CalendarYearMonth must be turned into // a string since you can't mix types // in a column. If it's already text, // you can just use the raw value without >& ""<. CalendarYearMonth & "" )
Anonymous
5 years agoNot applicable
BeforeActualYearMonth =
var CalendarYearMonth = Calendar[YearMonth]
// There must be just one value in LoadedAt
var LoadedAtYearMonth = SELECTEDVALUE( LoadedAt[YearMonth] )
return
if ( CalendarYearMonth < LoadedAtYearMonth,
"BeforeActual",
// CalendarYearMonth must be turned into
// a string since you can't mix types
// in a column. If it's already text,
// you can just use the raw value without >& ""<.
CalendarYearMonth & ""
)
EnderWiggin
Helper I
5 years agoThis is what I want, thank you Anonymous!