Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
redray82
Contributor
Contributor

How to show only selected quarter for Qlik sense chart? (last 2year's quarter)

Hi  I would like to show only selected quarter only 2 years..

Could you please check current expression.

And please change mine which the chart only show 2Years(8 Quarter) ?

Current Dimensions

=Dual(Year([Fiscal year])&'-Q'&Num(Ceil(Num(Month([Fiscal year]))/3)),QuarterStart([Fiscal year]))

Current measure

=count({$<[Issues Proudcts group]={'E'},[Code group]={'P'}>}[Code group])/Sum({$<[Shipping Proudcts group]={'E'}>}[Q'ty])

 

TEST1.jpg

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Add a Quarter field and Quarter sequence field to your calendar. This becomes simple set analysis:

...
Date,
Month(Date),
Dual('Q' & Ceil(Month(Date) / 3), QuarterName(Date)) as Quarter,
Year(Date) * 4 + Ceil(Month(Date) / 3) as QuarterSequence,
...

Then use QuarterSequence in your set expression to get the required quarter range.

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
redray82
Contributor
Contributor
Author

Thank you for your reply ... but i am a just beginner and is it possible to add your expresstion to my current qlik expression?

and please let me know where and how can i add your expression ?

-my current expression-

Current Dimensions

=Dual(Year([Fiscal year])&'-Q'&Num(Ceil(Num(Month([Fiscal year]))/3)),QuarterStart([Fiscal year]))

Current measure

=count({$<[Issues Proudcts group]={'E'},[Code group]={'P'}>}[Code group])/Sum({$<[Shipping Proudcts group]={'E'}>}[Q'ty])