Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavsurya
Partner - Specialist
Partner - Specialist

using If condition

Hi,

I have requirement wherein we have to show Revenue in a table for each cost centre for below mentioned scenarios

- If no year is selected, it should pick sum of Field "FAmount" for the Max year by default. The max year in this case is 2011

- If 2011 is selected it should pick sum of Field "FAmount"

- if 2010 is selected it should pick sum of Field "AAmount"

Can anybody help in providing the If statement here.

Thanks and Regards,

Raghav

5 Replies
Not applicable

Hi Raghav,

Your query is not yet very clear to me.

Is it possible to post some sample data and then explain exact queries based on it.

Regards,

Happy Thoughts

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Ravi,

I have attached the application. In the chart expression I have put in a if condition to select the sum based on the year. The expression picks up the value only when the year is selected.

What I need is the expression should pick the max year as a default for calculation if no year is selected.

Can you please help me out.

Regards,

Rahgav

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Ravi,

I am attaching the qvw file.

Regards,

Raghav

Not applicable

Hi Raghav,

Plz see attached file, "Solution" table chart.

Thats your answer probably.

Sincere Regards,

Happy Thoughts

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Ravi,

It has almost answered my question. One small issue in that. If any year is not selected the total is coming fine but the table still displays the the cost centre and its value namely AA which relates to Year 2010.

Can u pls help.

Regards,

Raghav