Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE: sum of years

Hi all,

I have one year filed  

2014-2015

2016-2017   lik dat   

i hve below exprsin used in gauge chart

Sum({<Year={$(=Max(Year))},TR_Date={">=$(vStartDate)<=$(vMonthEndDate)"},Quarter=,HalfYearFin=,Month=,Day=>}Cc_COUNT)

its working fine wen i select  one year means[2014-2015]    but wen i select two years both [2014-2015 and 2016-2017]

the result is not cmg  with sum .   only it is shwng max year values .   what is the issue ?  anyone trace out this?

10 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

This is because you have written it in set analysis to get max year.

See the script part "Year={$(=Max(Year))}"

So what ever year selection you will do, it will pick up the max out of it and show the result for that year.

If you want sum for both years, then remove that section from set analysis.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hi sureshqv,

Kaushik is correct you need to remove max(year) condition in set expression and try.

Chanty4u
MVP
MVP
Author

thnks kaushik.

i tried below still doesnt work anymore

1)  Sum({<TR_Date={">=$(vStartDate)<=$(vMonthEndDate)"},Quarter=,HalfYearFin=,Month=,Day=>}Cc_COUNT)


2) Sum({<Year=,TR_Date={">=$(vStartDate)<=$(vMonthEndDate)"},Quarter=,HalfYearFin=,Month=,Day=>}Cc_COUNT)

Anil_Babu_Samineni

As i know double quotes is not the problem , Can you please share your Sample App

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Please share a sample data along with the selection which you are doing and expected output.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Chanty4u
MVP
MVP
Author

Its nt psble. as its on server

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Probably you can just give us the sample data which can replicate your problem.

Data can be anything, which shows the problem you are facing.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anil_Babu_Samineni

Sum({<Year=, Month=, Quarter=, Day=, TR_Date={">=$(=Num(MonthStart(TR_Date)))<=$(=Max(vMonthEndDate))"}>} Sales)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Chanty4u
MVP
MVP
Author

let me try  .Thanks