Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
nudjaree1
Partner
Partner

Add a column dimension return"Invalid Dimension"

I need your help and advice. I would like to add a  column dimension in a table in Qliksense  that show Grade as you can see om expect result.

ID,  NO, Grade, Value

1  1  A  11

1  2  B  30

1  3  C  30

 2  1 D  40

2  3  C  10

2  2 B  40

3 1  A  10

4 1  B  10

 

This is my expect result.

ID  Max  Count No  Grade

1   30       3         2      B

2   40     3           1     D

3     10    1           1     A

4   10     1            1    B

 

I try to  use this expression  when I add a column dimension but I get "Invalid Dimension"
min(if(Value=aggr(max(Total <ID> Value),ID,No),Grade)) 

I also try to use 

Aggr(min(if(Value=aggr(max(Total <ID> Value),ID,No),Grade)) ,Grade)  but it doesn't work.

 

Regards 

Nudjaree 

Labels (2)
2 Solutions

Accepted Solutions
MayilVahanan

Hi @nudjaree1 

Try like below

LOAD *, RowNo() as Row INLINE [
ID, NO, Grade, Value
1,1,A,11
1,2,B,30
1 ,3 , C, 30
2, 1, D, 40
2, 3, C, 10
2, 2, B, 40
3, 1, A, 10
4, 1, B, 10
];

Dim / Measure

=Aggr(Only({<Row = {$(=Concat(Aggr(Min(Aggr(if(Value=max(Total <ID> Value),Row),ID, NO)), ID),','))}>}Grade), ID, NO)

MayilVahanan_0-1608112127980.png

 

Thanks & Regards,
Mayil Vahanan R

View solution in original post

nudjaree1
Partner
Partner
Author

@MayilVahanan It works. 🙂 Thank you very much.

View solution in original post

7 Replies
PriyankaShivhare
Creator II
Creator II

May be something like this

 

=if(if(Value=MAx(total <ID>Value),aggr(min(NO),ID,Value)),Grade)

PrashantSangle

might be you are adding as dimension. You should add as measure not dimension.

Great dreamer's dreams never fulfilled, they are always transcended.
nudjaree1
Partner
Partner
Author

Thank you for your answer but I get "-" when I create measure with this expression.

nudjaree1
Partner
Partner
Author

Yes, I added measure  as well but I dont have the correct expression.

MayilVahanan

Hi @nudjaree1 

Try like below

LOAD *, RowNo() as Row INLINE [
ID, NO, Grade, Value
1,1,A,11
1,2,B,30
1 ,3 , C, 30
2, 1, D, 40
2, 3, C, 10
2, 2, B, 40
3, 1, A, 10
4, 1, B, 10
];

Dim / Measure

=Aggr(Only({<Row = {$(=Concat(Aggr(Min(Aggr(if(Value=max(Total <ID> Value),Row),ID, NO)), ID),','))}>}Grade), ID, NO)

MayilVahanan_0-1608112127980.png

 

Thanks & Regards,
Mayil Vahanan R

View solution in original post

nudjaree1
Partner
Partner
Author

@MayilVahanan It works. 🙂 Thank you very much.

View solution in original post

MayilVahanan

Hi @nudjaree1 

Happy to help you.

 can you mark as correct answer if its helps for you.

Thanks & Regards,
Mayil Vahanan R