# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## Sum based off If and dates

I'm trying to create a calculation that sums total number of instances where client's based off min date.

The objective would be to add addtional columns to count specific instances like primary reason for entry.

But for now, I'm just trying to get formula below to work.

=Sum(Aggr(If([Entry Date] = Min(TOTAL <[Client Id]> Floor(Num([Entry Date]))),1,0)

Thanks

1 Solution

Accepted Solutions
MVP

## Re: Sum based off If and dates

May be this

=Sum(Aggr(If([Entry Date] = Min(TOTAL <[Client Id]> Floor(Num([Entry Date]))),1,0), [Client Id], [Entry Date]))

4 Replies
MVP

## Re: Sum based off If and dates

May be this

=Sum(Aggr(If([Entry Date] = Min(TOTAL <[Client Id]> Floor(Num([Entry Date]))),1,0), [Client Id], [Entry Date]))

Contributor

## Re: Sum based off If and dates

Thank you. The formula worked. Why was there need to add extra [Client Id], [Entry Date] at end of the formula?

MVP

## Re: Sum based off If and dates

You only were closing the if statement... but need to add the dimensions for the Aggr() function....

Contributor

ah, thank you.