Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to make the below expression dynamic in set analysis.
I tried Year = max(Year) & 'OL' which is not right; Then I tried assigning max(Year) & 'OL' to variable and passed it to the Year field in the expression, it says 'Allocated memory exceeded'
=sum({<Year = {'2016 OL'}>}Sales)
NOTE: I am using this in a bar chart and a straight table.
Can someone please help me with this ASAP.
Thanks!
And could you elaborate on 'does not work', please. Expression returns zero? Wrong value <> zero?
If you need to find the max year in your data ignoring selections:
Sum({<Year = {"$(=Maxstring({1} Year))"}>} Sales)
Your year field includes Text? May be this:
Sum({<Year = {"$(=Max(Year) & ' OL')"}>}Sales)
How do these year values look like? more than 1 value per year, with different chars at the end?
Maybe like
Sum({<Year = {"$(=Maxstring(Year))"}>} Sales)
This didn't work sunny;
Any other thoughts?
MaxString didn't work
I have appended text OL to the year 2016, so the year looks like 2016 OL
please let me know if you can think of something else
Try Stefan solution and see if that works, if not please consider sharing a sample
If you use
Sum({<Year = {"$(=Maxstring(Year))"}>} Sales)
as expression in your straight table and leave the expression label empty, then hover with the mouse over the column header, what do you see?
And could you elaborate on 'does not work', please. Expression returns zero? Wrong value <> zero?
If you need to find the max year in your data ignoring selections:
Sum({<Year = {"$(=Maxstring({1} Year))"}>} Sales)
When you put =MaxString(Year) -> What do you see in a text box object? Do you see 2016 OL?
Hi Stefan,
Just out of curiosity, would the two formulas produce the same result?
Sum({<Year = {"$(=Maxstring(Year))"}>} Sales)
and
Sum({<Year = {"$(=Maxstring({1} Year))"}>} Sales)