3 Replies Latest reply: Dec 10, 2015 4:48 AM by Aswin raaj RSS

    year-to-date and periodic via Indicator in Script

    Christian Wylezol

      Hi,

       

      I hope someone of you can help me.

      We have reports where we define in the calculations year-to-date(YTD) amounts:

       

      Example for YTD

      =
      ((
      sum({$ <Jahr = {$(=Only(Jahr))}, Monat = {"<=$(=max({<Jahr={$(=max(Jahr))}>} Monat))"}, balcode={$(BALCODE1)}, key_yr={$(=Only(Jahr))}, key_month={$(=Only(Monat))} >}[Saldenbetrag]*key_Proz)

       

      Example for Periodic

      sum({$ <Jahr={$(=Only(Jahr)-1)}, Monat={'*'}, El1_GRPCODE={'1KTO-BIL','1KTO-GUV'}, balcode={$(BALCODE1)} >}[Saldenbetrag])

       

      The Issue is, that we sometimes need the YTD-View and sometimes only periodical view (in several reports).

      Does someone of you maybe have an idea how to create a variable directly in the Script that defines periodic or YTD-View

      So that I can easily Switch or Show both in one table?

       

      Very much thanks in advance.

       

      Chris