Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am trying to create a bar chart where i would like to display data from the current year by category, but it should be dynamic, user can view other years by clicking in the filter:
I am just using the field name in my expression, and using the field "Category" as a dimension.
I can´t use triggers, once it will set the rule for all objects in my sheet.
So, how can i create the rule to display the current year in my chart?
Thanks
Hi,
adding to Sunny T advices, you can use an expression like this one:
=Sum({<Ano = {"$(=Year(Today()))"}>} quantity)
where quantity is your metric name.
What is the expressions for both of them. You just need to add the set analysis to your existing expressions. We can help you here if you share your expressions here.
Here are the expressions:
1) Sum(Occupants)
2) [Percentage Occupants]
See if one of these work:
1)
=Sum({<Ano= {"$(=Max(Ano))"}>}Occupants)
or
=Sum({<Ano= {"$(=If(GetFieldSelections(Ano) = 0, Year(Today()), Max(Ano)))"}>}Occupants)
2)
=Only({<Ano= {"$(=Max(Ano))"}>}[Percentage Occupants])
or
=Only({<Ano= {"$(=If(GetFieldSelections(Ano) = 0, Year(Today()), Max(Ano)))"}>}[Percentage Occupants])