Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make my report can display when user not select year = 2016 ?

Hi All

I have a expression working fine :-

money(

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} Invoice_Amt_SGD)

, $(vMoneyFormatK_S))

When i not select year = 2016 , the report will not display all row data.

My question is how to modify the expression , so that it will display all row when i select or not selectyear=2016 ?

Paul

4 Replies
paulyeo11
Master
Master
Author

My QVW

sagarkharpude
Creator III
Creator III

Do you want like "by default it should display all the data" and even if user selected 2016 there will be no impact on the data.

paulyeo11
Master
Master
Author

Hi Sagar

Yes you are right , by default it will display 2016 amount. meaning if user not select any year it will display last year amount,

In case user click on 2015 , it will display 2015.

In case user click on 2016 , it will display 2016.


Thank


Paul


sagarkharpude
Creator III
Creator III

You can store the max year value in variable and use that variable directly in set analysis. And you need to use the getselectedcount(year) to check whether any year is selected or not. If it is >0 then use "Year=P(Year)" in set analysis otherwise max year i.e. 2016 or 2017.

or instead of variable you can use like this


Sum({$<Year = {$(=Max(Year)-1)}>}[Amount])