Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have Year and Month in my data so, I have calculated yearquarter and previous yearquarter like below in script,
If(Ceil(Month/3)=0,Year&4,Year&Ceil(Month/3)) As YearQrtr
If((Ceil(Month/3)-1)=0,Year-1&4,Year&Ceil(Month/3)-1) As PrevYearQrtr
now, my requirement is when I select year 2019 and for that only Q1 data is available then in table it should show
values for 20184 and 20191 columns respectively.Likewise, If I select 2018 and Q4 then it should show 20183 and 20184 values.
so, in variables i have taken each field for prevyearqtr and currentqtr and expression is like,
sum({<YearQrtr={'$(currentqtr )'}>}sales)
but, they are giving same values for both current and prev.
Could any one suggest on this.
TIA
Why don't you try just this for the current qtr
Sum(sales)
and may be this for previous qtr
Sum({<YearQrtr = P(PrevYearQrtr), PrevYearQrtr>} sales)
Try this in that case
Sum({<YearQrtr = P(PrevYearQrtr), PrevYearQrtr, Year, Quarter>} sales)
Basically, ignore selections in all year and quarter fields and let YearQrtr drive your result