Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line chart showing 12month rolling values

Hi there ,

this is my expression :

if(OMetric= 'Gross Margin', sum({<FY={$(vMaxYear_CompletePeriod)},Flag={'Actual'},[Headline_Fig]={'Gross Margin'}>}Amt)/1000,

I want the line chart to show the values for 12 months... say if i click on 2016 , period 6, it should show from 2015 period 7 to 2016 period 6...

Could anyone help me with the same please ?

Thanks much

6 Replies
sunny_talwar

Is you FY runs from beginning of period 7 to end of period 6? If it does than your FY={$(vMaxYear_CompletePeriod)} should already be taking care of what you need? What exactly isn't working? Can you provide more details?

Chanty4u
MVP
MVP

HirisH_V7
Master
Master

Hi ,

Your line chart expression should be,

=sum({1< Date = {">=$(=MonthStart(Max(Date), -11))<=$(=MonthEnd(Max(Date)))"}>}Sales)

HTH,

Hirish

HirisH
koushik_btech20
Creator
Creator

Hi vidisha,

You can create date using period and Year,

Like for Period 6 and Year 2015,

makedate(Year,Period) as Date   //-so the date will be like 01/06/2015

Then in the expression just mention start date and end date inside set expression using variable as date range like,

=sum({Date={'>=$(vStartDate)<=$(vEnddate)'}}Sales)

vStartdate=Addyears(vEndDate,-1)

vEnddate=Max(Date)

Regards,

Koushik

Not applicable
Author

Hey Sunny,

when i click on 2015, it shows values for all 12 months.. when i click 2016, i want it to shows values for 2016- period 1 to period 6...

On click of 2016, i want to show the period from 2015th period 7 to 2016th period 6 (thats 12 month in total)

Thanks much

Not applicable
Author

I have already checked that.. thanks much