Hi,
I would need to create a query from the table below:
ID, Key, Name, Period
It would be a Pivot, as I need the sub-amounts of two different months, like June 2018 and Sept 2017.
I managed to write a query using the Transform and Pivot functions, but when I add the 2nd period, it results the same amount for both periods which is obviously incorrect, and the graphic desgner doesn't even allow me to edit it like this.
What am I doing wrongly?
Code:
TRANSFORM Sum(addSupSource.Eur) AS SumOfEur
SELECT addSupSource.Name, addSupSource.EUR, addSupSource.sKey, addSupSource.Period
FROM addSupSource
WHERE (((addSupSource.Name) Like "*Doe*") AND ((addSupSource.Period)=#6/1/2018# Or (addSupSource.Period)=#1/9/2017# Or (addSupSource.Period)=#1/9/2017#))
GROUP BY addSupSource.Name, addSupSource.EUR, addSupSource.sKey, addSupSource.Period, addSupSource.Period
PIVOT addSupSource.Period;
Thank you