Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I always struggle with where to use quotes. Usually I can get it to work after some trial and error, but this one has me baffled. I'm trying to write a statement to go find last quarter's result. I have a variable vCurrentQtr that stores a value (ex: 'Q3'). If true, this statement works fine, but if false it doesn't work. It has to do with how I'm parsing the quarter:
=If('$(vCurrentQtr)'='Q1',
Sum({$<FiscCalYr={'$(PreviousYear)'}, FiscCalQuarter={'Q4'} >} ResalePriceExtUSD),
Sum({$<FiscCalYr={'$(CurrentYear)'}, FiscCalQuarter={'Q' & Text(Num(Right('$(vCurrentQtr)',1)-1))} >} ResalePriceExtUSD)
)
So, I begin to troubleshoot...
This works: FiscCalQuarter={'Q3'}
This does not work: FiscCalQuarter={'Q' & '3'}
This does not work: FiscCalQuarter={$('Q') & $('3')}
So, how do I build a string concatenation then?
Can anyone help? I've spent hours going through every variation I could think of and it's still not working. I need to evaluate the number in 'Q3' so I can decrement.
Yes, it is often not straightforward... Try if it works:
FiscCalQuarter={"$(='Q' & '3')"}
Yes, it is often not straightforward... Try if it works:
FiscCalQuarter={"$(='Q' & '3')"}
Hi, have you tried something like FiscCalQuarter={$(='Q' & Text(Num(Right('$(vCurrentQtr)',1)-1)))} ?