
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Tags:
- aggr()
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MayilVahanan It works. 🙂 Thank you very much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be something like this
=if(if(Value=MAx(total <ID>Value),aggr(min(NO),ID,Value)),Grade)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
might be you are adding as dimension. You should add as measure not dimension.
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 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer but I get "-" when I create measure with this expression.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I added measure as well but I dont have the correct expression.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MayilVahanan It works. 🙂 Thank you very much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nudjaree1
Happy to help you.
can you mark as correct answer if its helps for you.
Please close the thread by marking correct answer & give likes if you like the post.
