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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Selecting Latest Quarter

I need to create a line chart by selecting the latest year and quarter. PERIOD field has values like:

2013 1Q

2013 1H

2013 2Q

2013 FY

2012 4Q

2012 2H

...

I need to look for 2013 2Q for example.

Is there any finction that I could use or need to split it by Substring() ?

Labels (1)
1 Solution

Accepted Solutions
Nicole-Smith
MVP
MVP

=maxstring({<PERIOD = {'???? ?Q'}>}PERIOD)

View solution in original post

3 Replies
Nicole-Smith
MVP
MVP

=maxstring({<PERIOD = {'???? ?Q'}>}PERIOD)

Anonymous
Not applicable
Author

This worked fine in a Text Object but can't seem to use it as a calculated Dimension in a Straight Chart.

Nicole-Smith
MVP
MVP

Make a variable (i.e. vMaxQuarter with the expression from above), then make your dimension on the chart:

=if(PERIOD = vMaxQuarter, PERIOD)