Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I am trying to compare sales by current quarter vs previous quarter using set analysis.
When a user click in the quarter list box, the straight table should show max quarter and its previous quarter sales. However whenever i do selections in quarter list box both current and previous quarter columns are giving same values.
I think the varaiable vMaxQuarter and vPriorQuarter has got issue.
Please help !!
vPriorQuarter needs to be calculate differently and you need to calculate the year of the previous quarter too. See attached qvw.
you are using
=Ceil(num(month(max(QUARTER_DATE)-1))/3) as prior quarter
max(QUARTER_DATE)-1 will give you a date just one day older than the max date so the date is having the same quarter.
you may try this for your vPriorQuarter variable expression
=Ceil(num(month(max(QUARTER_DATE)))/3)-1
EDIT: one more thing I found is that the Year is not considered while comparing quarters. is that intentional.
right now your chart will compare the total value of Q1 from all possible year to Q2.
vPriorQuarter needs to be calculate differently and you need to calculate the year of the previous quarter too. See attached qvw.
Thanks you so much for the help !!