Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Black_Hole
Creator II
Creator II

RowNo with multiple dimensions

Hello all,

I am trying to add a count column with the following expression:

=aggr(DISTINCT rowno(total), CUSTID, INVOICE, DATEAUST)

But, the result is not what I expect. Below an illustration of my result:

CUSTID | INVOICE | DATEAUST | ResultExpression

LB152 | ABC | 20200501 | 63

LB152 | ABC | 20200501 | 5

SB225 | DEF| 20200501 | 25

SB225 | DEF| 20200501 | 33

Please could you help me to correct my expression in order to have the expected result:

CUSTID | INVOICE | DATEAUST | ResultExpression

LB152 | ABC | 20200501 | 1

LB152 | ABC | 20200501 | 2

SB225 | DEF| 20200501 | 1

SB225 | DEF| 20200501 | 2

SB225 | DEF| 20200801 | 1

SB225 | DEF| 20200801 | 2

Thank you in advance for your help.

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be try this

=Aggr(
    RowNo()
, CUSTID, INVOICE, DATEAUST, UNIQUEENTRY)

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

The value of the 3 dimensions from the first 2 rows are exactly the same. what is another dimension which would make the dimension unique?

Black_Hole
Creator II
Creator II
Author

Hello @sunny_talwar ,

There is a column named UniqueEntry which has this kind of value:

CUSTID | INVOICE | DATEAUST | UNIQUEENTRY | ResultExpression

LB152 | ABC | 20200501 | 60721 | 63

LB152 | ABC | 20200501 | 60722 | 5

SB225 | DEF| 20200501 | 49028 | 25

SB225 | DEF| 20200501 | 49029 | 33

 

Thank you in advance for your help.

 

sunny_talwar
MVP
MVP

May be try this

=Aggr(
    RowNo()
, CUSTID, INVOICE, DATEAUST, UNIQUEENTRY)