Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous Year Fixed

Ciao,

I need some help on this. I need to have the cummulate vs Prior Year,  what  i need is , if i do a filter in weeks, the expresión shows the cummulate ( and not just the week )

The thing is. I have the Current year with this expresion  , and this Works properly -----   sum({$Weeks=>} NUM_PAX_BKD

The problem is in the prior year., I have a complex expresión, but i can not fix it  to not affect the filter of the week.

EXPRESION:

if(v_chek_w_m_q=1,
if(v_chek_y_cru=0,

     
sum({$Weeks=,Month=,Quarter=,Year=,[Year Cruise]=,[Quarter Cruise]=,[Month Cruise]=,$DAY={">=$(=v_start_pp_py)<=$(=v_end_pp_py)"}> NUM_PAX_BKD),
   
if(v_chek_mq_cru=0,
      
sum({$<Year=,[Year Cruise]=,[Quarter Cruise]=,[Month Cruise]=,Weeks=,Month=,Quarter=,Year=,
      
$DAY={">=$(=v_start_pp_py)<=$(=v_end_pp_py)"}, $DAY_START_MONTH_CRUISE={">=$(=v_start_pp_py_cru)<=$(=v_end_pp_py_cru)"}>}
      
NUM_PAX_BKD),
      
sum({$<Weeks=,Month=,Quarter=,Year=,[Year Cruise]=,[Quarter Cruise]=,[Month Cruise]=,$DAY={">=$(=v_start_pp_py)<=$(=v_end_pp_py)"},
      
$DAY_START_MONTH_CRUISE={">=$(=v_start_pp_py_cru)<=$(=v_end_pp_py_cru)"}>}   NUM_PAX_BKD))),
  
if(v_chek_y_cru=0,
          
sum({$<Weeks=,Month=,Quarter=,Year=,[Year Cruise]=,[Quarter Cruise]=,[Month Cruise]=,$DAY={">=$(=v_start_pp_py)<=$(=v_end_pp_py)"}>}
          
NUM_PAX_BKD),

          
sum({$<Weeks=,Month=,Quarter=,Year=,[Year Cruise]=,[Quarter Cruise]=,[Month Cruise]=,$DAY={">=$(=v_start_pp_py)<=$(=v_end_pp_py)"},
          
$DAY_START_MONTH_CRUISE={">=$(=v_start_pp_py_cru)<=$(=v_end_pp_py_cru)"}>}   NUM_PAX_BKD)))

Thanks!

1 Reply
Carlos_Reyes
Partner - Specialist
Partner - Specialist

If you upload a sample app it'll be easier to help you... and perhaps we can get rid of all those variables and make your expression a lot simpler.