Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have a requirement to show delta / net movement of values between Current Quarter ( Or any Selected Quarter ) with its previous quarter.
There is a possibility - we can't have quarters in sequence. Mostly we don't have Q4 datasets. So, if we need to compare between Q1'2019 then its previous quarter is Q3'2018. So, its purely based on user selection to select a current quarter.
I have values like 2017' Q4, 2018' Q1, 2018' Q2, 2018' Q3, 2019' Q1 & 2019' Q2. As I receive the value from a dataset as is, there is no date field / calendar to derive quarters.
Can I have any ideas how to proceed with this implementation?
Thanks a lot 🙂
Yes Sunny. All numbers are from current quarter ( based on user selection ).
So, you did create a field like called display_year, right? How exactly did you create it? I mean what was the syntax you used in the script to create it?
Its simply a replace function removes Q and Comma from the year_quarter i.e. 2018, Q1. Post removal of Comma and Q it became a number 20181.
I have used the display year to calculate previous quarter, with the expression I shared earlier. Then I have put that quarter as a set expression to calculate KPIs, then compute Delta.
Though I have managed to get this done via multiple variables in the backend script and able to generate the required outcome. However, performance became a concern. At some point of time I have to change the way to get the previous quarter KPI values from a resident table only.
The reason I say it might be easier to use
AutoNumber(Year_Quarter) as YearQtrNum,
compared to what you have is that it will be easy to go back one quarter when it is sequential number vs 201704, 201801....
Yes Sunny, the method you have suggested it will work for all type of scenarios. I found a lucky escape by simply replace few characters, but your suggested method will be the best.