Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
venkanna_info
Partner - Contributor
Partner - Contributor

QTD rule issue (working for 2016,2017 but not for 2018 data)

Hi All,

I am looking for the rule as below.

If we are in Jan, we need to see Jan sales and Jan + Feb + Mar Sales Goals when QTD is selected;

If we are in February, we need to see Jan + Feb sales and Jan + Feb + Mar Sales Goals when QTD is selected;

If we are in March, we need to see Jan + Feb + Mar Sales and Jan + Feb + Mar Sales Goals when QTD is selected.

I have a data for 2016,2017,2018.QTD rule is working fine for 2016 and 2017 data,but when i check data for 2018( i have data for 2018 till Apr) not working(Ex: when i select Jan,its showing QTD-Mar,but when i select Feb ,it is showing QTD-Apr and When i select Apr ,it is showing QTD- Apr).

Initially i want to correct QTD rule for 2018 data and after that i want sales to be displayed like below mentioned.

Expected output :

When i select Period : Jan and QTD ,output will show only Jan sales

When i select Period :Feb and QTD,output will show Jan+Feb Sales

When i select Period :Mar and QTD,output will show Jan+Feb+Mar Sales

Kindly need your suggestions at the earliest,it is very urgent to me.

Kindly help me.

11 Replies
venkanna_info
Partner - Contributor
Partner - Contributor
Author

The output of the $(v_Periodo_Seleção_Daily) is mar 2018.if i apply <= ,it is not taking .

Could you please suggest?

duncanblaine
Creator
Creator

Is Period a Date?

It so, you can try the following:

RangeSum (

If (Dimensionality () = 1

(

Sum ({$<Period_Type = {'$(=v_Periodo_Daily)'}, Period = {'<=$(=Date(Date#(Upper(v_Periodo_Seleção_Daily),'MMM YYYY')))'}, Origin = {'Direct Sales'}>} DirectSales.$(=_Metrica_Sufix))

+

Sum ({$<Period_Type = {'$(=v_Periodo_Daily)'}, Period = {'<=$(=Date(Date#(Upper(v_Periodo_Seleção_Daily),'MMM YYYY')))'}, Origin = {'Daily'},_Period_Tipe_Daily=>} Daily.$(=_Metrica_Sufix))

)