Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF AND ELSE IF

HI ALL,

I HAVE AN EXPRESSION IN MY TABLE like below

if(T1_Group = ('1A' or'2A') and T1.Period < 201408 ,Sum(T2.revenue),Sum(t1.revenue))

hear T2.revenue is displaying the results only corresponding group of i.e where t2.Group = ('1A' or'2A'))


Currently the results are showing incorrectly for the above expression can anybody correct me

T1--Table 1

T2---Table 2

8 Replies
rajeshvaswani77
Specialist III
Specialist III

Hi Kishore,

Can you post an example?

thanks,

Rajesh Vaswani

Anonymous
Not applicable
Author

Hi

Try this :

if((T1_Group = '1A' or T1_Group ='2A') and T1.Period < 201408 ,Sum(T2.revenue),Sum(t1.revenue))

yevgeniy
Creator
Creator

Hi Kishore,

Try this:

if(T1_Group = ('1A') and T1.Period < 201408,Sum(T2.revenue),

if(T1_Group = ('2A') and T1.Period < 201408,Sum(T2.revenue),

Sum(t1.revenue)))

Not applicable
Author

Hi,

i am displaying T1 pivot table.

Table1 (T1):                          

                                                       Jan2014    Feb2014................................

Material Group | Group      Events       Revenue     Revenue ...............................

Mg1                 1A             Event1          200         100     

                                        Event2          200          300

                                        Event3          300          400

                        2A            Event1          100          500

                                        Event4          100          600

while Collapse with only Group in  my Pivot Table results are expecting in T1 table like Jan 600 and Feb 400 for Group 1A based on condition success ......if failed cases(where period >201408) results are aggregated like 700 in Group 1A as like above..

There is no Event Dimension in the T2 table ..

Table2(T2):  

                                                     

                                                       Jan2014    Feb2014

Material Group | Group                        Revenue     Revenue

Mg1                  1A                               600          400     

                                                                              

                         2A                                500         600

                                               

Can you help on this

yevgeniy
Creator
Creator

May be problem is, aggr

your need change Sum(T2.revenue), try this:

aggr(Sum(T2.revenue),Group,Period)

Not applicable
Author

Hi, Yevgeniy

The above solution working when individual selections applied on the Pivot table...But not whole table why?

when i clear the selections it showing original Table1 Expression Values can you address the issue

Thanks.

yevgeniy
Creator
Creator

May be you tables have null values?

Not applicable
Author

yes i have null values in my table i tried supress null values by dimension wise

same result subtotals not working