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

Not getting added sum when selecting two financial year or any selection

When I select two financial year am not getting the sum of both year total complaints or fbc complaints or in any of the  box the sum is not coming, only the highest year value is coming. the expression used in total complaints is :

Sum({<Year={$(=Max(Year))},TRANDATE={'>=$(vStartDate)<=$(vMonthEndDate)'},Quarter=,HalfYearFin=,Month=,Day=>}CMP_CUSTOMER_CALL_COUNT)

where vStartDate is :=If (GetSelectedCount(Month)=0 And GetSelectedCount(Quarter)=0,MonthStart(Date(Max(Date))),Date(Min(Date)))

and vMonthEndDate is :=MonthEnd(max(Date))

the default view without any selection should shows current month data only in the 6 boxes, and when selected any particular financial year or Months the total for the selection should come in all the boxes. The box is a gauge and straight table selected in fast type change in the general tab of a chart.

Can anyone please help me in solving this.

5 Replies
vinieme12
Champion III
Champion III

You are fixating on the Max Year in your expression(in bold), remove this and this will work as you need it .

You don't need year as you are already comparing dates

Sum({<Year={$(=Max(Year))},TRANDATE={'>=$(vStartDate)<=$(vMonthEndDate)'},Quarter=,HalfYearFin=,Month=,Day=>}CMP_CUSTOMER_CALL_COUNT)


Can you provide a sample to demonstrate?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Thanks for the reply Vineeth, but still after removing Year={$(=Max(Year))} when am selecting two financial year its showing value for the highest year only.

sunny_talwar

Would you be able to share a sample where we can see the issue?

Not applicable
Author

I have uploaded the sample waiting for the mederator approval.

vinieme12
Champion III
Champion III

Hi Milin,

It's because you are only selecting dates for the latest period, instead of selecting dates use Months.

So your expression should look something like below

sum({<MonthIS = {">=$(StartMonth)<=$(EndMonth)"} >} ,Quarter=,HalfYearFin=,Month=,Day=>}CMP_CUSTOMER_CALL_COUNT)

This might also be helpful.

Period Presets: Compare Periods on the fly

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.