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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple selection Issue

Hello,

I am having a month field with 1, 2,3....11,12.

I am using a condition as

if(MonthField >= num(month(quarterstart(date(MonthField)),'0'), A,B)

This is working fine if I select 1 value in Month Field, But If I select 2 MonthField Values (ex: 1 and 2). I am not getting the result. How should I use this condition on multiple MonthField Selections.

Thanks

8 Replies
its_anandrjs
Champion III
Champion III

Please provide some sample data with output will be easy to help out.

Not applicable
Author

I need to get totals in Straight Table when two Month values are selected

JonnyPoole
Former Employee
Former Employee

i think you need a chart aggregation expression in your THEN and ELSE clauses like this for example:

=If(Month >=num(month(quarterstart(date(today())))),sum(A),sum(B))

Anonymous
Not applicable
Author

in the expressions tab, under "Total Mode", use Sum of rows instead of Expressions Total. that should do it.

Not applicable
Author

I think, I am having problem in explaining the issue. I am attaching QVW file. I need the values in 2nd Text object when 2 Month Field Values are selected which are greater than this QuarterStart Date. It ll be more clear if you look into the expressions I used.

JonnyPoole
Former Employee
Former Employee

changed the text box expression too...

= sum( If(Month >=num(month(quarterstart(date(today())))),A,0))

Not applicable
Author

I am getting an error because Nested aggr functions cannot be used.

In my actual application In place of A I have Sum() inside that I have lop of set analysis. Is there any other approach?

Thanks

JonnyPoole
Former Employee
Former Employee

Then you may need to wrap what you have in a Sum( Aggr(   <whatyouhave> ,  <dimension> ))  expression.  since its a text box, perhaps try 2 single quotes  '' as the <dimension> value.