Giter VIP home page Giter VIP logo

Comments (1)

ishaqbaig avatar ishaqbaig commented on August 11, 2024

The Above was achieved using the below variables
New Variables were created to achieve this

  • vSetFULLYear - the Full Year based on the selected year/month. Not same as YTD
  • vSetPreviousFULLYear – the Full LAST Year based on the selected year/month. Not LY YTD
  • vSetFULLMonth - The FULL Month based on the selected month
  • vSetFULLPreviousYearMonth - The FULL Month of last Year based on the selected month

//---------------------------------------------------------------------
//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) = {"&lt;=@(=$(_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)

}'
);

from qlikview-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.