Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have some problems with this set analysis:
max({$<CampaignYear={"$(=Max(CampaignYear)-1)"}>}Score)
I attached the file output, I don't get why I cannot see the data from the previews year..
Thanks for any helps
Your set analysis is basically saying "show the max score where Year = 2017".
To achieve what you want you need to use the above() function. This blog post should help: The Above Function
Your set analysis is basically saying "show the max score where Year = 2017".
To achieve what you want you need to use the above() function. This blog post should help: The Above Function
Hi
I think it is working well because your max year = 2018.. so max year -1 = 2017 and data is populated for 2017
Hi.
try this
Sum({$<CampaignYear={"$(=Max(CampaignYear)-1)"}>}Score)
Thanks for your answer..
So I would populate that for all rows...
How I should write it?
any idea?
it doesn't work, I achieve the some results..just populate for 2017
The max(CampaignYear) always return 2018, then it just populate for 2017.
I think you should check Above() function as colinh mentioned above.
Above(max(score))
Hi I don't think that Above could be a solution, because the table that you can see in the picture, is a filtered table.
I needed maybe just to change the set expression and not populate the max score for just 2017 (max Year -1), but for all of them.
That would just give you the same as max(Score). If you want to show the value from a different row, e.g., the 2017 value on the 2018 row, then you'll need to use an inter-record function such as above(). Alternatively you could do it in your load script using peek() or previous(), or by creating a table with Year-1 as a dimension and then joining that to your original table.
I agree with you. An easiest way is to add a new dummy calculation column in data load namely Previous_Campaigned_Year= Campaigned_Year - 1
then make the set analysis like:
max( {<CampaignYear= P(Previous_Campaigned_Year) >} Score)