Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to make a bar chart of the sales of a particular department and certain type of fruit and that for the previous 12 months by month.
So I want a graph with on the X axis 01-2016 , 02-2016, 03-2016 and for each month the sale of Apples for the new department.
to calculation of the sales for the department and fruit is done by:
=Sum({<Group = {New}, Fruit = {Apple} >} [Sales])
This gives me back the Sales for Apples in the new group
To present the previous 12 months in the graph I use this:
=Sum ({$<K_Period={">=$(=$(vPeriodStartYear))<=$(=Max(K_Period))"},K_Year=,K_Month=>}Sales)
This gives me all sales of all fruits and
So I want to combine both statements but everything i tried so far failed.
=Sum ({$<Group = {New}, Fruit = {Apple}, K_Period={">=$(=$(vPeriodStartYear))<=$(=Max(K_Period))"},K_Year=,K_Month=>}Sales)
I found the answer by myself allready
=Sum ({$<K_Period={">=$(=$(vPeriodStartYear))<=$(=Max(K_Period))"},K_Year=,K_Month=,[Group="New"], [Fruit=[Apple]>}Sales)
=Sum ({$<Group = {New}, Fruit = {Apple}, K_Period={">=$(=$(vPeriodStartYear))<=$(=Max(K_Period))"},K_Year=,K_Month=>}Sales)
I'd check the result of that expression if I were you. [Group="New"] and [Fruit=[Apple] are not valid syntax. I'd be surprised if an expression containing that would return a result at all/.
Is that is work for you? I don't think so
I used this one
Sum ({$<K_Periode={">=$(=$(vPeriodeStartYear))<=$(=Max(K_Periode))"},K_Year=,K_Month=,[Group]={"New"}, [Fruit]={"Apple"} >}_aantal_calls)
It works
That looks a lot better