Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Query crosstab with forced column values, add extimated values

14 views
Skip to first unread message

Stefano

unread,
Dec 10, 2023, 6:19:56 AM12/10/23
to
I have the following query crosstab where I had forced column values, it is based on a query where I have [Ore spese Wk] hours for week and its week number [nWk], I need to add in the query crosstab the [StimaWk] that are extimated hours for future weeks, this values are not linked to any week numbers, just add value from next week to all weeks in future.

Here the query details:

TRANSFORM IIf([Wk]>DatePart("ww",Now()),Sum([Ore stimate Wk]![StimaWk]),Sum([Ore spese Wk 0]![SpeseWk])) AS H
SELECT [Ore spese Wk 0].[ID attività]
FROM [Ore spese Wk 0] INNER JOIN [Ore stimate Wk] ON ([Ore spese Wk 0].ID = [Ore stimate Wk].ID) AND ([Ore spese Wk 0].[ID attività] = [Ore stimate Wk].[ID attività])
GROUP BY [Ore spese Wk 0].[ID attività]
PIVOT [Ore spese Wk 0].nWk In (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52);

I have some doubts that it is possible, any idea?

Stefano
0 new messages