Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

What is Sum(1) ?

Hi All,

I am confused in one expression.

If I write sum(1), it is showing some values.

Please check my new sheet in attached App.

Thanks,

Sarif

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Using sum(1) across a dimension would mean, summing 1 as many times as the dimension values are there. That is, it would be similar to =Count(YourDimension), i.e. =count(Z_FROM_TIME)

View solution in original post

3 Replies
tresesco
MVP
MVP

Using sum(1) across a dimension would mean, summing 1 as many times as the dimension values are there. That is, it would be similar to =Count(YourDimension), i.e. =count(Z_FROM_TIME)

techvarun
Specialist II
Specialist II

Sum(1) and count(1) is the frequency of the value in the data model

woshua5550
Creator III
Creator III

You can assume that you have a filed "Counter" which contains 1 for each rows of your table "ORD_VOL"

Sum(1) = Sum(Counter) and also

Sum(1) = Count(<one arbitrary field in table ORD_VOL>) , e.g Count(SHIP_LINE_CNT)

in addition Sum(100) = 100 * Count(SHIP_LINE_CNT)