Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, could you please help me modify my set analysis. Unfortunately it is not working now.
Let's say, I have data only for 2021 year.(Months are optional, user may chose one or several month or may not, then we are working with the year ). In this case if 2022 is chosen, I don't have ay data and getting an error message in the chart. If I change year to 2021, I have data in my chart. Could you please help me to write set analysis, to show las max period if I don't have data for the period that was chosen by end user.
This is my current formula
avg({<Year = {$(=Max(Year))}>}aggr(only({<Year = {$(=Max(Year))} Amount),ID))
Thanks a lot in advance!
Hi, not knowing your data model seems like this could work:
avg({<Year={$(=MAX({<ID*={"*"}>}Year))}>}Amount)
Hello @RsQK , thank you very much for your answer. I'm sorry, it take me some time to answer.
Should I put something instead of stars(ID*={"*"}) or it's punctuation and I should leave it as is?
Thank you very much in advance!
Hello, I've simplified my my formula to
Sum(
{<Year = {'$(=Max(Year))'}>} Amount) But for some reason formula is not working and shows data only when 2020 year is chosen. When I chose 2022, it doesn't show data. What can be wrong?
Thanks a lot in advance!