Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a problem with the previous month
vPrevMonth2 = =Month(AddMonths(Date(Today()),-1))
sum({$<Month={'$(vPrevMonth2)'},Year=,Month=,Day=>}IF((SALESPRICE)*QTYORDERED=0,' ',SALESPRICE*QTYORDERED))
sum(IF((SALESPRICE)*QTYORDERED=0,' ',SALESPRICE)*QTYORDERED)
Why are the results in my pivot in both coluns the same?
Hi
That's because the set expression is broken in some way.
You might just need an = sign here: $(=vPrevMonth2)
Did you test that this works correctly?
{$<Month={'$(=Month(AddMonths(Today()-1)))'}, Year=, Month=, Day=>}
Is the field Month in the same format and language as that returned by the Month function?
HTH
Jonathan
i need = sign but nothing happens.
when i select a special month for exampel Sep in the second column the result is right and in the first column nothing changes, it shows the whole numbers...
...and when i test my variable in a text box i get the right result...
The problem is that in your set expression you first define Month to be a specific month, and later disregard that selction again by saying Month=,. Remove the Month=, so:
sum({$<Month={'$(vPrevMonth2)'},Year=,Day=>}IF((SALESPRICE)*QTYORDERED=0,' ',SALESPRICE*QTYORDERED))
with this formula it works
sum({<Year={'$(vPrevMonthYear)'},Month={'$(vPrevMonth)'},TCMSALESORDERDATE=,MonthYear=>}IF((NAME_ECORESATTRIBUTE)
='Produktserie',SALESPRICE*QTYORDERED))
In this expression you have no duplicate field selections (Year=Value, disregard sel MonthYear).
I tested the Month=Sel, Month= in set expression and the combination will disregard the Month=Sel with Month=. Have you tried my suggestion?