Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have Period='AUG' that corresponds to FiscalPeriodNumber=11
If I try to use Period in Set Analysis, it works but if I use FiscalPeriodNumber it doesn't work.
In the following 1) is ok and 2) doesn't work
1) sum({$<FiscalYear = {2011}, Period={'AUG'} >} ShippedUnits/12)
2) sum({$<FiscalYear = {2011}, FiscalPeriodNumber={11} >} ShippedUnits/12)
The first one give me the right value but the second one returns zero.
Could someone give me any tip to find what could be wrong in the formula.
Thank you.
FiscalYear | Period | FiscalPeriodNumber | Sum(ShippedUnits/12) | If(FiscalPeriodNumber =11 , 'ELEVEN') | sum({$<FiscalYear = {2011}, Period={'AUG'} >} ShippedUnits/12) | sum({$<FiscalYear = {2011}, FiscalPeriodNumber={11} >} ShippedUnits/12) |
2011 | OCT | 1 | 40,029 | - | 0 | 0 |
2011 | NOV | 2 | 38,226 | - | 0 | 0 |
2011 | DEC | 3 | 15,028 | - | 0 | 0 |
2011 | JAN | 4 | 43,439 | - | 0 | 0 |
2011 | FEB | 5 | 37,104 | - | 0 | 0 |
2011 | MAR | 6 | 67,346 | - | 0 | 0 |
2011 | APR | 7 | 41,900 | - | 0 | 0 |
2011 | MAY | 8 | 35,676 | - | 0 | 0 |
2011 | JUN | 9 | 55,157 | - | 0 | 0 |
2011 | JUL | 10 | 27,697 | - | 0 | 0 |
2011 | AUG | 11 | 7,802 | ELEVEN | 7,802 | 0 |
Note: In my application I am actually using a variable instead of 11. I simplified the formula before submitting to the forum.
Hello Patricio,
I rebuild your example with an application of my own. Had no problems with QV, it works as expected. I suspect the syntax (or value) of your variable. So please send your expression and your variable or even better a little app with the whole chart.
Regards, Roland
Thank you Roland. You are right.
I did the same as you in a dummy document and it worked. So I decided to create a new document from scratch, copy the script and copy all the objects. It worked like this. Both documents are exactly the same (script and objects)
It was a document that was created originally in 8.2 even if now we have 9 SR6. It is not the first time that I have unexpected problems with old documents that I cannot solve unless I re-create everything from scratch.
Here are the results in the new document
FiscalYear | Period | FiscalPeriodNumber | Sum(ShippedUnits/12) | If(FiscalPeriodNumber =11 , 'ELEVEN') | sum({$<FiscalYear = {2011}, Period={'AUG'} >} ShippedUnits/12) | sum({$<FiscalYear = {2011}, FiscalPeriodNumber= {11} >} ShippedUnits/12) |
409,403 | - | 7,802 | 7,802 | |||
2011 | OCT | 1 | 40,029 | - | 0 | 0 |
2011 | NOV | 2 | 38,226 | - | 0 | 0 |
2011 | DEC | 3 | 15,028 | - | 0 | 0 |
2011 | JAN | 4 | 43,439 | - | 0 | 0 |
2011 | FEB | 5 | 37,104 | - | 0 | 0 |
2011 | MAR | 6 | 67,346 | - | 0 | 0 |
2011 | APR | 7 | 41,900 | - | 0 | 0 |
2011 | MAY | 8 | 35,676 | - | 0 | 0 |
2011 | JUN | 9 | 55,157 | - | 0 | 0 |
2011 | JUL | 10 | 27,697 | - | 0 | 0 |
2011 | AUG | 11 | 7,802 | ELEVEN | 7,802 | 7,802 |