Closed ishaqbaig closed 4 years ago
The Above was achieved using the below variables New Variables were created to achieve this
//--------------------------------------------------------------------- //Gets Data from 01/01/2019 to 31/12/2019 if the selected year is 2019 //Gets Data from 01/01/2018 to 31/12/2018 if the selected year is 2018 // FULL Year of the Selected year //--------------------------------------------------------------------- Let $(_fieldPrefix)vSetFULLYearModifier = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '$(_vClearFieldList) $(_f_MonthSerial) = {"<=@(=$(_qvctemp.vMaxModifier)$(_f_MonthSerial)))"}, $(_fYear) = {"@(=$(_qvctemp.vMaxModifier)$(_fYear)))"}' );
Let $(_fieldPrefix)vSetFULLYear = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '{$< @($(_fieldPrefix)vSetFULLYearModifier)
}' );
//--------------------------------------------------------------------- //Gets Data from 01/01/2018 to 31/12/2018 if the selected year is 2019 // FULL Previous Year of the Selected year //--------------------------------------------------------------------- Let $(_fieldPrefix)vSetPreviousFULLYearModifier = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '$(_vClearFieldList) $(_f_MonthSerial) = {"<=@(=$(_qvctemp.vMaxModifier)$(_f_MonthSerial))-12)"}, $(_fYear) = {"@(=$(_qvctemp.vMaxModifier)$(_fYear))-1)"}' );
Let $(_fieldPrefix)vSetPreviousFULLYear = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '{$< @($(_fieldPrefix)vSetPreviousFULLYearModifier)
}' );
//--------------------------------------------------------------------- // Gets data from 01/12/2019 to 31/12/2019 if the selected month is Dec-19 // Whereas MTD gives data from 01/12/2019 to 19/12/2019 (if today is 19/12/2019) // Full Month Total of the selected month //--------------------------------------------------------------------- Let $(_fieldPrefix)vSetFULLMonthModifier = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '$(_vClearFieldList) $(_f_MonthSerial) = {@(=$(_qvctemp.vMaxModifier) $(_f_MonthSerial)))}' );
Let $(_fieldPrefix)vSetFULLMonth = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '{$< @($(_fieldPrefix)vSetFULLMonthModifier)
}' );
//--------------------------------------------------------------------- // Gets data from 01/12/2018 to 31/12/2018 if the selected month is Dec-19 // Whereas Last Year MTD gives data from 01/12/2018 to 19/12/2018 (if today is 19/12/2019) // Full Month Previous Year Month //--------------------------------------------------------------------- Let $(_fieldPrefix)vSetFULLPreviousYearMonthModifier = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '$(_vClearFieldList) $(_f_MonthSerial) = {@(=$(_qvctemp.vMaxModifier) $(_f_MonthSerial))-12)}' );
Let $(_fieldPrefix)vSetFULLPreviousYearMonth = MapSubString('_qvctemp.Calendar.EscapeCharsMap', '{$< @($(_fieldPrefix)vSetFULLPreviousYearMonthModifier)
}' );
Dear Rob, How can I achieve CurrentFullYear & CurrentFullMonth If I select YTD for 2019 need to get data from 01/01/2019 to 31/12/2019 instead of 01/0/2019 till Today() Regards Ishaq