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: 
Not applicable

Jan to till selected months data should display..

Hi All,

I have a bar chart,Line chart and combo chart in my application in all the charts month is a dimension,it is working fine.I have year and month in list boxs.

Now i have a requirement, when i select the Year=2013 and month=Feb in list box the bars and lines should display jan and feb,if i select mar the bars and lines should display jan,feb and mar.....like this i wnat to display the max(year) jan month to till selected months should display in all the charts.

thanks in advance...

regards,

baru

8 Replies
nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi,

Try this Expression

sum({<CalDate = {">=$(=Date(Yearstart(max(CalDate))))<=$(=max(CalDate))"},CalMonth=,CalQuarter=>}Sales)

Regards,

Nirav Bhimani

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the attachment.

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
Author

Hi Kaushik and Nirav

thanks for your reply,

I already tryed this in my application,but its not working.

May be i am using sets in 2 if conditions having flags.

Thats is the problem i am not getting the exact output....

thanks for ur help....

any other solutions...

regards,

baru

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Could you please tell us in detail what you are doing to achieve this.

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
Author

Hi,

pls check my expression:

=if(metrics = 'Value',if(Group='Total',
Sum({<IsTotal = {'Y'},CommonYear = {"$(=max(CommonYear))"},CommonMonth={"<=$(=max(CommonMonth))"}>}NETSaleVal)/100000
,

Sum({<CommonYear = {"$(=max(CommonYear))"},CommonMonth={"<=$(=max(CommonMonth))"}>}NETSaleVal)/100000)
,
if(Group='Total',Sum({<IsTotal = {'Y'},CommonYear = {"$(=max(CommonYear))"},CommonMonth={"<=$(=max(CommonMonth))"}>}NETSaleQtyAFClaimConv),
Sum({<CommonYear = {"$(=max(CommonYear))"},CommonMonth={"<=$(=max(CommonMonth))"}>}NETSaleQtyAFClaimConv)))

this expresion i am using pls check....

regards,

baru

Not applicable
Author

After using this exression,

i am getting the correct formate but data is showing wrong.

when i click on 2012,oct month the bars is showing jan-oct,but oct data is correct and jan-sep data is showing wrong...

whaen i remove the selection in month list box all the months is showing correct data...

thanks in advance...

baru

Anonymous
Not applicable
Author

use

sum({<Year={$(=max(Year))},Month={ '<= $(=max(month))' } >}sales )

by default it will show max year max month data like for current year 2013 upto march in your bars and lines

and if you select feb then it will show bars jan and feb

Regards,

anant

Not applicable
Author

HI ananth,

tryed but it is not showing correct data for remaining months

any help....