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: 
narayanamsn
Creator
Creator

Time comparison

@@Hi Gurus,

I have an example with dummy sales data where in  i need to plot time series Quarterly sales comparison.

I want to derive comparison table that holds the sales with max quarters for each combination.

This table should change the values if I select any Quarter accordingly

@Vishwarath Nagarau vnagaraju

stalwar1    

CompanyRouteMax QtrPre QtrSame Qtr Last YrQ/QY/Y
ARetail180-300=(180 -0 )/0=(180 -300 )/300
Awholesale200150290=(200 - 150 )/150=(200 - 290 )/290
Total380150590=(380 - 150 )/150=(380 - 590 )/590
BRetail120-150=(120 - 0 )/0=(120 - 150 )/150
Bwholesale200150180=(200 - 150 )/150=(200 - 180 )/180
Total320150330=(320-150)/150=(320 - 330)/330
16 Replies
sunny_talwar

‌Make a selection in FYQTR and you will get your answer.

narayanamsn
Creator
Creator
Author

Thank you Sunny,

I got 2 queries.

YearMonth = {[$(='<=' & Max(YearMonth))]}>}YearMonth, 2))"}

1. Can I write the above condition like this YearMonth = {"$(= Max(YearMonth ,2))"}..

          What is the difference between the above 2 conditions?

2. I am unable to get the % if I use the actual expressions instead of =Column(1)/Column(2)-1?


what could be the reason for not getting the same result if I use expression instead of column()?


Regards,

Satya

narayanamsn
Creator
Creator
Author

= Sum({<Qtr, FYQTR, YearMonth = {"$(=Max(YearMonth,2))"}>}Sales) will make the values to 0 when we select any qtr

vishsaggi
Champion III
Champion III

Got it.

sunny_talwar

1) Nope, one is saying <= second max month year and other is just = to second max month year

2) I don't see why you can't do it... I tried and works the same way

sunny_talwar

Yup, you got it

sunny_talwar

And glad you got it too