Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How many distinct X-Dim-Values are there per Y-Dim-Value

Hi,

 

I didnt find an answer for this. X-Dim and Y-Dim are even in the same table, but I didnt found a formula that works in this kind of table(total, aggr)... :

XYCountXperY
113
213
313
422
522
631

 

Hope you can help me. Thanks alot. 🙂

Best regards

1 Solution

Accepted Solutions
OmarBenSalem

aggr(count({<X>}total <Y> X),Y,X)

Result:

Capture.PNG

View solution in original post

5 Replies
OmarBenSalem

count(total <Y> X)

 

Result : 

Capture.PNG

Anonymous
Not applicable
Author

Thanks for your help, but Im sorry, I made a slight mistake.

I need this value without the Y-Dimension in the table:

XX per Y
13
23
33
42
52

 

I hope this is possible with Qlik. 

 

Best regards. 

Rohan
Specialist
Specialist

Hello,

Please try the below mentioned code.

A :
load * inline [
x,y
1,1
2,1
3,1
4,2
5,2
6,3
];


B :
Load y,
(Count(x)) as x_p
Resident A Group by y;

 

Also, let me know if it works for you as well.edit2.png

OmarBenSalem

aggr(count({<X>}total <Y> X),Y,X)

Result:

Capture.PNG

Anonymous
Not applicable
Author

Thanks alot thats great!