Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nudjaree1
Partner - Contributor III
Partner - Contributor III

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
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

nudjaree1
Partner - Contributor III
Partner - Contributor III
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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
nudjaree1
Partner - Contributor III
Partner - Contributor III
Author

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

nudjaree1
Partner - Contributor III
Partner - Contributor III
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
Please close the thread by marking correct answer & give likes if you like the post.
nudjaree1
Partner - Contributor III
Partner - Contributor III
Author

@MayilVahanan It works. 🙂 Thank you very much.

MayilVahanan

Hi @nudjaree1 

Happy to help you.

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.