Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
john_henry
Contributor III
Contributor III

How to sum the number of records in a QVD file

I am trying to create an ODAG selections app and I need to sum the number of records in a QVD file.  The following SQL script works when I'm sourcing from a SQL database, however, I am sourcing from a QVD and need to convert the SQL script below to Qlik syntax:

SQL SELECT

SUM(Value),

sum(1) as Total_Line_Items,

Dimension1,

Dimension2

From...

Group By

Dimension1,

Dimension2;

1 Solution

Accepted Solutions
MayilVahanan

HI @john_henry 

Try like below

Load

SUM(Value),

1 as Total_Line_Items,

Dimension1,

Dimension2

From yourSourceQVD

Group By

Dimension1,

Dimension2;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

HI @john_henry 

Try like below

Load

SUM(Value),

1 as Total_Line_Items,

Dimension1,

Dimension2

From yourSourceQVD

Group By

Dimension1,

Dimension2;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
john_henry
Contributor III
Contributor III
Author

that worked...thanks!