Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

syntax set analysis

Hi i have a calculation whereby i calculate accumulated value. This works well for current year 2013/2014

=Sum(

        {$<

            FYear={"$(=Dual(Max(fYear)-1 &'/'& Max(fYear), Max(fYear)))"},

            fMonth={"<=$(==Max( {<fYear={$(=Max(fYear))}>} fMonth))"}

        >}

        Nettobelopp)

i have tried to show previous year without any luck 2012/2013. i think my syntax is wrong, any ideas?

=Sum(

        {$<

            FYear={"$(=Dual(Max(fYear)-2 &'/'& Max(fYear) -1, Max(fYear)-1))"},

            fMonth={"<=$(==Max( {<fYear={$(=Max(fYear)-1)}>} fMonth))"}

        >}

        Nettobelopp)

Best

Brad

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

HI

Try like this

=Sum(

  {<

  FYear={"$(=Dual(Max(fYear)-2 &'/'& (Max(fYear)-1), Max(fYear)-2))"},

  fMonth={"<=$(=Max( {<fYear={$(=Max(fYear))}>} fMonth))"}

  >}

  Nettobelopp)

or

Try like this

=Sum(

  {$<

  fYear={$(=Max(fYear)-1)},

  fMonth={"<=$(=Max({<fYear={$(=Max(fYear))}>} fMonth))"},

  FYear=

  // månad,dag,datum

  >}

  Nettobelopp)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan
MVP
MVP

Hi

can you explain FYear contains data format?


can you provide any sample data / sample file?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thank you for your reply

i have attached the file.

the format of the FYear = 2013/2014;

MayilVahanan
MVP
MVP

HI

Try like this

=Sum(

  {<

  FYear={"$(=Dual(Max(fYear)-2 &'/'& (Max(fYear)-1), Max(fYear)-2))"},

  fMonth={"<=$(=Max( {<fYear={$(=Max(fYear))}>} fMonth))"}

  >}

  Nettobelopp)

or

Try like this

=Sum(

  {$<

  fYear={$(=Max(fYear)-1)},

  fMonth={"<=$(=Max({<fYear={$(=Max(fYear))}>} fMonth))"},

  FYear=

  // månad,dag,datum

  >}

  Nettobelopp)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.