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

Quarter in line graph

hi all,

I need to display the line graph for quarterly. Last 4 quarters.

quarter name should be 3/31, 6/30, 9/30 and 12/31 of every year.

Now presently running last quarter so it should show from last quarter of last year and 3 quarters of this year.

How can i achieve this.

Thanks,

Kumar

19 Replies
reddy-s
Master II
Master II

Hi promodgc3,

I have replicated what you need and attached the sample qvf. Only the rolling years quarters are shown up always.

Capture.PNG

Hope this solves your issue!

- Sangram

Not applicable
Author

Hi sangam Reddy,

Eventhough it restricts to 4 quarters, my requirements is not as you shown,

As this quarter is still not completed i need a last 4 quarters,

Means dec/31/2014, mar/31/2015, jun/30/2015,sep/30/2015...

not last quarter of 2015

reddy-s
Master II
Master II

Hi Pramodgc3,

This way you can get only the last 4 quarters, but not considering this quarter:Capture.PNG

- Sangram

Not applicable
Author

Thanks for the reply.

once the dec/31/2015 is completed the last 4 quarters will be changed right?

Not applicable
Author

Error while load script123.png

reddy-s
Master II
Master II

Hi promodgc3,

Your first variable in the 'IF' statement was NULL, hence this error. Check the date formats once or it would be easy if you attach a sample qvf. I will fix it for you.

once the dec/31/2015 is completed the last 4 quarters will be changed right? - Yes it will absolutely work. On 1st of Jan 2016, its going to show Mar/31/2015, June/30/2015, Sep/30/2015 and Dec/31/2015


Not applicable
Author

Hi Sangram,

Thanks i fixed, how to sort the quarters as it must display in order...

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*,

if(Last4Quarters = 1, Date(QuarterEnd(Date), 'M/D/YYYY') ) AS Quarter

FROM DataSource;

Hope this helps you.

Regards,

jagan.

Not applicable
Author

Hi jagan,

You check the first sheet in attached app.

It showing 5 quarters and also not in order help on it.

reddy-s
Master II
Master II

Hi Promodgc3,

So for sorting purpose, just change the expression to :

if(Last4Quarters = 1, Date#((Day(QuarterEnd(Date)) & '/' & num#(Month(QuarterEnd(Date)))& '/' & year(QuarterEnd(Date))), 'DD/MMM/YYYY'))

and sort it using the sorting pannel:

Capture.PNG

This should solve the sorting issue