Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
denisetrujillo
Contributor III
Contributor III

set analisys

Hello everyone,


I need your support, I want to use the set analisys. in my graphics I need to add the sales according to the selected year; but if the year is not selected, add the sales of the maximum date.


how can I do it


I am using
sum ({<[Year] = {'$ (= year (max (Date)))'}>} Sales) but when you want to select two years in my filter, you do not add them to me.


hic

2 Replies
Digvijay_Singh

May be this -

if(getselectedcount(Year)=0,

     sum ({<[Year] = {'$ (= year (max (Date)))'}>} Sales),

     sum(Sales)

)

denisetrujillo
Contributor III
Contributor III
Author

Thanks for your support, his answer helped me a lot.