
Re: Calculation problem
Tormod Hanstad Oct 21, 2013 9:02 AM (in response to Magdalena Tammegger)What if you make a simple set analysis as two separate expressions
=sum({$<Period={$(=MIN(Period))}>} Menge)
AND
=sum({$<Period={$(=MAX(Period))}>} Menge )
Tormod Hanstad

Re: Calculation problem
Magdalena Tammegger Oct 21, 2013 9:05 AM (in response to Tormod Hanstad)If you looked at the picture I posted if I do the set analysis sum({<min(...)>}MENGE) it only calculates the stock right for the product we got delivered first. so the pivot table doesnt use the min(date) for each row right in the set analysis

Re: Calculation problem
Michael Solomovich Oct 21, 2013 10:14 AM (in response to Magdalena Tammegger)Magdalena,
Either try the suggestion from GW, or create a field in the data model:
min(Datum) as FirstOrderDatePerProduct
Regards,
Michael



Re: Calculation problem
Gysbert Wassenaar Oct 21, 2013 10:06 AM (in response to Magdalena Tammegger)The set analysis expression calculates one set for the entire chart, not a set per row. Perhaps the firstsortedvalue can be used: firstsortedvalue(MENGE, DATUM)

Re: Calculation problem
Magdalena Tammegger Oct 22, 2013 7:24 AM (in response to Gysbert Wassenaar )hi,
thanks for the quick response but all you suggestions didn't work because also when I save the firstoderdateperproduct i still come across the same issue. because every produkt has a different FirstOrderDatePerProduct. i am using now this in my set analysis or did I understand something wrong?
regards,
MT

Re: Calculation problem
Michael Solomovich Oct 22, 2013 8:24 AM (in response to Magdalena Tammegger)It is expected that each Product has its own FirstOrderDatePerProduct. The expression in your table probably should be:
sum(if(FirstOrderDatePerProduct=DATUM, MENGE))
But I could be wrong without knowing what the data is about and what MENGE means. In this case the problem is not with the pivot table but in the overall data model design.Regards,
Michael

