Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to create a chart expression to calculate sales over each month for max selected year. The expression I'm working on is:
sum({< Year = {$(=Max(Year))>} Amount)
but it shows no value. Could you please tell what needs to be changed?
Thank you,
Przemek
Hi, you are missing a "}"
correct expression: Sum({< Year = {$(=Max(Year))}>} Amount)
Regards, tresesco
Indeed, I missed it, but the issue seems to be somewhere else - still not working.
the only way for us to find an issue "somewhere else" is to see it. If you can post an example, we could possibly examine it...
Attached. Hopefully it'll be helpful.
Well, I can see a couple of problems:
1. Your Set Analysis condition had a few syntax errors - missing "=" signs, misplaced brackets, etc... The correct equasion is this:
Sum({< Rok={$(=Max(Rok))}>} Kwota)
2. In your data, you have absolutely identical values of Kwota, with positive and negative signs, so the total sum of Kwota is always equal to zero. You can only see it if you select specific values of Kwota. It's caused either by the nature of your data (zero-sum accounts?), or by the way you generated your sample data.
if you correct those two problems, you'll see monthly numbers in your chart.
Store Max(Year) in a variable lets's say,
Varaible name = vYear
Varaible Description = =Max(Year)
So, your expression should be:
sum({< Year = {$(=vYear)}>} Amount)
Hope this works!