Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i cant get this set analysis working. The commented out one is working, but i want sums for max available year, max available year -1, etc
JAHR = year column
NETTOTOTAL = total column
/*
Sum(
{$<
JAHR={2024}
>}
NETTOTOTAL
)
*/
Sum(
{$<
JAHR={"=$(=(Max(JAHR)))"}
>}
NETTOTOTAL
)
The data is fetched from oracle
SELECT to_char(belegdatum, 'yyyy') AS Jahr,
...
Any hint how to slove this?
Thanks
Can you try the below:
Sum({$<JAHR={$(=Max(JAHR))}>}NETTOTOTAL)
Try changing Jahr to a numeric value as Max() works with numeric values. Alternatively, try using MaxString().
Hello,
I think the = is too much.
Try this:
Sum(
{$<
JAHR={"$(=(Max(JAHR))"}
>}
NETTOTOTAL
)
Can you try the below:
Sum({$<JAHR={$(=Max(JAHR))}>}NETTOTOTAL)
if you put the max(JAHR) in a text object what does it return?
This is working. Thanks.
But the syntax is hard to read and confusing. While in the commented out version i get the correct results for 2024 as number and string, the dynamic only works with MaxString.
Also a this is working
Sum({$<JAHR={"$(=MaxString(JAHR))"}>}NETTOTOTAL)
while an pair of extra brackets will not
Sum({$<JAHR={"$((=MaxString(JAHR)))"}>}NETTOTOTAL)
You haven't said what the problem is/what unexpected result you are getting, but perhaps try this:
Sum({$<JAHR={$(=(Max({1}JAHR)))}>}NETTOTOTAL)
I had gotten a total of 0 or a sum of all records.
Your solution works too and reacts independent to already filtered data. Thanks.