Solved Display the corrct Heading in pivot Query

Sepp1945

Member
Local time
Tomorrow, 07:48
Joined
Feb 12, 2023
Messages
33
I have a query which displays all sold products total correctly, but the heading is the product code NOT the product name
1677312747702.png


TRANSFORM Count(tblPayments.Product_ID) AS CountOfProduct_ID
SELECT "Total Count" AS Remarks
FROM tblScale INNER JOIN tblPayments ON (tblScale.AMOUNT = tblPayments.Product_Value) AND (tblScale.ID = tblPayments.Product_ID)
GROUP BY "Total Count", tblScale.SCALE
PIVOT tblPayments.Product_ID;

tblScale.SCALE is the product name
how can i fix it
1677312895790.png
 
Is that what you mean?
Code:
TRANSFORM Count(tblPayments.Product_ID) AS CountOfProduct_ID
SELECT "Total Count" AS Remarks
FROM tblScale INNER JOIN tblPayments ON (tblScale.AMOUNT = tblPayments.Product_Value) AND (tblScale.ID = tblPayments.Product_ID)
GROUP BY "Total Count"
PIVOT tblScale.SCALE
 
yes thank you very much
 

Users who are viewing this thread

Back
Top Bottom