Forum Discussion
FranklinVaz
Jul 28, 2021Copper Contributor
DSum conditional expression in Query
Hi Everyone, I am fairly new to MS Access, stuck with below challenge with framing an expression. Please help. Table: SiteLogT Contains income/expense of a project datewise Query: I a...
- Jul 28, 2021
Hi George_Hepworth,
That worked, many thanks. You gave me the spark to ignite the fire in me 🙂
Until next time.
Regards,
Frank
George_Hepworth
Jul 28, 2021Silver Contributor
If SiteLogT is the name of the table in question (as it appears in the screenshot),
then you can try this:
SELECT ProjID, Sum(Iif([LogType] = "Income", [Amount],0) AS IncomePerProject, Sum(Iif([LogType] = "Expense", [Amount],0) as ExpensePerProject
FROM SiteLogT
Group By ProjID
- FranklinVazJul 28, 2021Copper Contributor
Hi George_Hepworth,
That worked, many thanks. You gave me the spark to ignite the fire in me 🙂
Until next time.
Regards,
Frank