Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
expression box:
vF1Type - 'A','B','C','D'
vF2Type - 'Value1','Value2'
I have this expression:
(Sum( {<Field1={$(vF1Type)},Field2={$(vF2Type)}>} Sales * [Transaction Quantity])/1000000)
/+ (Sum({<Field1={$(vF1Type)},Field2={'Miscellaneous receipt'},Field3={'OUTS'}>} Sales * [Transaction Quantity])/1000000)
I stored this inside a variable but when i call the variable in the expression of a pivot table it doesnt give me the correct value.
What did i do wrong??
i want this formula to generate values by quarter
can u plz share your document.
up
Hi Mars,
You Cannot Use a Variable Directly inside the Value field of set analysis, What you can do is Build the expression as a variable and the value you want to put in set analysis as another variable and in the expressions tab use the final expression's variable.
for eg.
MaxCurrDate ---> max(CurrDate)
Expression ---> 'sum({$<CurrDate = {"'&MaxCurrDate&'"},Metric_Name={USD}>} [INR/1 Unit])'
then use the Expression's variable in expressions tab
Mars,
I think your single-quotes are messing you up.
Try this instead:
Variables:
That might work right away. If not, try this:
Expression:
(Sum( {<Field1={'$(vF1Type)'},Field2={'$(vF2Type)'}>} Sales * [Transaction Quantity])/1000000)
/+ (Sum({<Field1={'$(vF1Type)'},Field2={'Miscellaneous receipt'},Field3={'OUTS'}>} Sales * [Transaction Quantity])/1000000)