Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
nazaninegogo
New Contributor III

how show current year value and whole data in dashboard with filters

Dears

I have a dashboard that I want show current year data (2019)

I wrote the expression like this and applied it in all my tables and charts: 

sum({<Year={"$(=Max(Year))"},Area_Category-={"Test","Free ShortCode","Xtratime","ACS"}>}REVENUE)

but when I pick both 2018 and 2019 years together, my dashboard just show the 2019 value.

but when I choose one by one it shows correct

how can I fix this problem to show whole data when I choose both 2018,2019??

I attached my QV in this post.

Thank you 

Labels (1)
3 Replies

Re: how show current year value and whole data in dashboard with filters

Try an expression which checks if you have made a selection in the Year field.... if it has then you use another expression otherwise a default expression which gives you the data for the max year. For example... this for New Sub(Count) expression

=If(GetSelectedCount(Year) = 0,
num(sum({<Year={"$(=Max(Year))"},Area_Category-={"Test","Free ShortCode","Xtratime","ACS"}>}NEW_SUBSCRIPTION_COUNT), '#,##0'),
num(sum({<Area_Category-={"Test","Free ShortCode","Xtratime","ACS"}>}NEW_SUBSCRIPTION_COUNT), '#,##0'))
nazaninegogo
New Contributor III

Re: how show current year value and whole data in dashboard with filters

Dear Sunny

thanks for your helpful response

as I applied the expression on my charts, it is not worked

would you please help

chart.PNG

nazaninegogo
New Contributor III

Re: how show current year value and whole data in dashboard with filters

Dears
would you please help me regarding previous post.
thank you