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: 
vanderson009
Creator III
Creator III

Quarter Issue

I have below Data Set, I want to plot line chart with Dimension as YearQuarter and Type, Measure is QTY.

But my requirement is to take only latest 12 Quarter i.e. 3 Years. (YearQuarter is in Text format)

  

YearQuarterTypeQTY
Q1-13AB451
Q2-13PQ156
Q3-13RX245
Q4-13ZS352
Q1-14VT154
Q2-14UV254
Q3-14NA325
Q4-14YZ342
Q1-15MN315
Q2-15ZS421
Q3-15VT432
Q4-15UV421
Q1-16NA412
Q2-16YZ142
Q3-16MN254
Q4-16UV325
Q1-17NA342
Q2-17YZ315
Q3-17MN421
Q4-17ZS412
Q1-18VT142
Q2-18UV254

Please suggest set analysis for this erquirement.

Thanks,

Villyee.

3 Replies
YoussefBelloum
Champion
Champion

Hi,

you can do something like this:

create a counter using autonumber(YearQuarter) and use it on your set analysis

PFA

vanderson009
Creator III
Creator III
Author

Thanks for your valuable feedback.

Can we have any other option, Cause i will not able to update script. I have to do it on chart level.

Regards,

Villyee

YoussefBelloum
Champion
Champion

I would not recommend it, but here is one way to do it:

=sum({<YearQuarter={"=rank(total right(YearQuarter,2)&Mid(YearQuarter,2,1))<13 and rank(total right(YearQuarter,2)&Mid(YearQuarter,2,1))>=1"}>}QTY)