Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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 | DATEAUSTResultExpression

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 | DATEAUSTResultExpression

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 (2)
1 Solution

Accepted Solutions
sunny_talwar

May be try this

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

View solution in original post

3 Replies
sunny_talwar

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

May be try this

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