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: 
chinnu123
Creator
Creator

Requirement on If condition

Hi Team,

I have a requirement to display four quarters in four objects(straight tables).

I.e we have four quarters named Q1, Q2,Q3,Q4

In the first table q1 data must display second table q2 third table q3....

Here the condition is I have a field name called Country And the values are USA, CANADA,INDIA etc

Here I need to write a condition related to country and quarter

I.e if we select country usa the  usa q1 data must be dispalyed in first table

if we select country usa the usa q2  data must be dispalyed in second  table.

In the same way for other countries


Can any one give the synatax for this




Thanks in Advance

Chinnu


4 Replies
swuehl
MVP
MVP

If you make active selections in Country field, e.g. 'USA', your chart automatically will reflect this selection (Qlik logic default behaviour).

To filter quarters, you can use either an if() statement or set analysis in your chart aggregation functions:

=Sum( If(QuarterField = 'Q1', Amount))

or

=Sum({<QuarterField = {'Q1'}>} Amount)

Accordingly for other quarters.

trdandamudi
Master II
Master II

May be as attached... Please modify according to your needs:

chinnu123
Creator
Creator
Author

Thanks for the reply swuehl,

Here the Country is selection field (multi box) for the Users. Users will select   country in which they need to see the quarter results so they can select any of the country

trdandamudi
Master II
Master II

That is what Stefan is saying "Qlik logic default behaviour". When you select different countries from the list box it will show you the selected countries in your table/chart.

Hope this helps...