# App Development

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Contributor III

## How to count record with have the same date

Please advise how to count no. of customer records buying any product on the same date .

 Customer Product Transaction_Date A xxx 01/01/2020 A yyy 01/01/2020 A zzz 02/01/2020 B xxx 01/01/2020 B yyy 01/01/2020 B zzz 01/01/2020 B xxx 02/01/2020 C zzz 01/01/2020

Expected result

 Customer Transaction Date Count A 01/01/2020 2 A 02/01/2020 1 B 01/01/2020 3 B 02/01/2020 1 C 01/01/2020 1

3 Solutions

Accepted Solutions
MVP

Try like below

Dim: Customer, Transaction Date

Measure: Count(Product)

Thanks & Regards,
Mayil Vahanan R
MVP

Try like below

Sum(Aggr(If(count(distinct Transaction) > 3, 1, 0), Customer, Date))

Thanks & Regards,
Mayil Vahanan R
Contributor III
Author

Hi Mayil Vahanan R,

Thank you for your advise.  Sum(Aggr(If(count(distinct Transaction) > 3, 1, 0), Customer, Date)) -- > Transaction means field name that need to count right?

10 Replies
MVP

Try like below

Dim: Customer, Transaction Date

Measure: Count(Product)

Thanks & Regards,
Mayil Vahanan R
Contributor III
Author

Hi Mayil Vahanan R,

Thank you so much for your advice.  I got the result already. However, if I would like to add a calculation field for  customers who have make a transaction on the same date more than 3 times per day. What would be the script to do that.

MVP

Try like below

Sum(Aggr(If(count(distinct Transaction) > 3, 1, 0), Customer, Date))

Thanks & Regards,
Mayil Vahanan R
Contributor III
Author

Hi Mayil Vahanan R,

Thank you for your advise.  Sum(Aggr(If(count(distinct Transaction) > 3, 1, 0), Customer, Date)) -- > Transaction means field name that need to count right?

MVP
Yes, it's ur transaction field name..
Thanks & Regards,
Mayil Vahanan R
Contributor III
Author

Hi MayilVahanan,

It works now. Thank you so much for your help.

Contributor

I am also having this issue. Kindly please provide any relevant solution.

tellthebell

Contributor III

Hello , i am new on qlik sense, pls

 DATE SHOP NAME SCRAP COST 23/05/2022 A1 55.123 23/05/2022 A1 663.12 23/05/2022 A1 456.12

Required Output

 Date Shop Name SUM of SCRAP COST 23/05/2022 A1 55.123+663.12+456.12
MVP

Hi

You can create the table with  Date and ShopName as Dimension

Measure: sum([SCRAP COST])