Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings
Please find attach the QVW file.
When I am selecting the period the output is showing for current month and prior month. But if I am selecting month it's not showing prior period value.
Please advise.
Thanks!!
That's because your selection in months in combination with the set expressions that sets the period to prior period results in an incompatible set. You can clear selections in month:
sum({< Year = {$(vMaxYr)} , Period = {$(vMaxPeriodH)},Month= >} qty)
Or look into a different concept:
There is no data available for Year 2016 and Period 11 and 12 and that is why you are seeing 0's (or nulls in your case because Suppress When Null is checked on Presentation tab)
That's because your selection in months in combination with the set expressions that sets the period to prior period results in an incompatible set. You can clear selections in month:
sum({< Year = {$(vMaxYr)} , Period = {$(vMaxPeriodH)},Month= >} qty)
Or look into a different concept:
Thanks !! It is working.
Can you please help me to calculate the last 6 months average.
For an example when you select Dec it must give avg from July - Dec , for Nov - Jun- Nov.
Many Thanks
You can either work with the AsOf table approach or using set analysis.
Since last 6 months can spread across multiple years, you should create a sequential counter in your script, something like
LOAD
Year,
Period,
Month,
Year*12+Period as PeriodNum,
...
FROM ...;
Then you can easily use something like
Avg({< Year = , Period =, Month=, PeriodNum = {">=$(=Max(PeriodNum)-5)<=$(=Max(PeriodNum))"} >} qty)
Can you please amend this to the QVW file.
I have attached the source file for the QVW file.
Thanks
Just like I've shown above.
Many Thanks!! It's working.
The Only prob is when selecting any month it's only taking that month value.
Please help.
No, it won't take only this month's value, since I cleared the selection in month field:
Avg(TOTAL {< Year = , Period =, Month=, PeriodNum = {">=$(=Max(PeriodNum)-5)<=$(=Max(PeriodNum))"} >} qty)
Can you give an example that shows what you are telling using the sample QVW I've attached?