Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Need assistance in small logic in Qliksense.
I need to calculate sum(allocation) for current Quarter by below logic,
When the Month is First month of Quarter, it Should Calculate Sum(amount) as it is
When the Month is Second Month of Quarter,it should calculate Sum(amount) of FIrst Month+Second Month and divide by 2.
When the Month is Third Month of Quarter, it should calculate Sum(amount) of First+Second+Third Month and divide by 3.
I applied logic as below but the logic works only when the month is selected. But i dont need month to be selected i.e.,without Month selection also it must show the sum(amount)
if(MonthYear=MonthName(QuarterStart(today())),
Sum({<QuarterYear_S={'$(VCurrentQtr)'},MonthYear={'$(=MonthName(QuarterStart(today())))'}>}amount),
if(MonthYear=MonthName(QuarterStart(today()),1),
(Sum({$<QuarterYear_S={'$(VCurrentQtr)'},MonthYear{'$(=MonthName(QuarterStart(today())))','$(=MonthName(QuarterStart(today()),1))'}>}
amount)/2),
if(MonthYear=MonthName(QuarterStart(today()),2),
(Sum({$<QuarterYear_S={'$(VCurrentQtr)'},MonthYear={'$(=MonthName(QuarterStart(today())))','$(=MonthName(QuarterStart(today()),1))','$(=MonthName(QuarterStart(today()),2))'}>}
amount)/3)
)))
Kindly assist. Thanks in advance.
Hi,
Kindly help.
Thanks in advance.
Avoid doing it in expression. Create simple As-Of-Table