Share via

sumif like func in access

Anonymous
2016-11-15T10:53:46+00:00

in my database some of my order value is CAP and other is DRF like

Allocation Value
CAP 200
DRF 100
CAP 2000
CAP 1000

now i want a summation such that CAP & DRF Segregated, like CAP=3200, DRF = 100, TOTAL = 3300, WHICH I DO IN EXCEL with a use of sumif function, how can i do this in access.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2016-11-15T12:04:05+00:00

    SELECT

        SUM([Value]*IIF(Allocation="CAP",1,0)) AS TotalCAP,

        SUM([Value]*IIF(Allocation="DRF",1,0)) AS TotalDRF,

        SUM([Value]) AS OverallTotal

    FROM [YourTableNameGoesHere];

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,810 Reputation points Volunteer Moderator
    2016-11-15T11:08:30+00:00

    A Group By query or use a Dsum()

    Was this answer helpful?

    0 comments No comments