Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jerryr125
Creator III
Creator III

Table visualization - same row displaying twice

Hi - I have a table visualization showing the following (as an example):

Location     Quantity     Comments

-------------  ------------    ----------------

LOC01       100                  -

LOC02       2000               -

LOC03       545                 quantity from abc inc.

LOC03      545                   -

 

The 'comments' is in another table (one occurrence BUT not every location has a comment).

Since LOC03 has a value in the 'comments' fields, it is now displaying  twice in my visualization (as seen above).

 

How can I remove the second occurrence of LOC03 and still keep LOC01, LOC02, and LOC03 in the table visualization ?

Therefore, the outcome would be :

Location     Quantity     Comments

-------------  ------------    ----------------

LOC01       100                  -

LOC02       2000               -

LOC03       545                 quantity from abc inc.

 

Also, the comments fields is a dimension since I am using an if statement to pull the comments from another table.

It works fine - the issue is the appearance of the second occurrence.

Thanks - Jerry

Labels (1)
7 Replies
jerryr125
Creator III
Creator III
Author

Hi - any thoughts  on this ? Thanks - Jerry

Gysbert_Wassenaar

Well, the rows are not duplicates because they differ. One has a value in the Comments field and the other does not. If you want only one row you will have to use a measure that aggregates the values in the Comments field. Perhaps MaxString(Comments) works for you.


talk is cheap, supply exceeds demand
jerryr125
Creator III
Creator III
Author

Hi - 

I currently have in the column (dimension) the following formula:

=IF([materialid]='mat01',(comment))

 

If I add MaxString to the formula (again, in a column that is a dimension):

 

=IF([materialid]='mat01',MaxString(comment))

I get an error - invalid dimension

 

jerryr125
Creator III
Creator III
Author

I tried this as well:

=IF([intrppematerialid]='ppemat01',aggr(maxstring(intrcomment),intrcomment))

no luck - same results - thoughts ?

Gysbert_Wassenaar

Try removing the dimension and adding a measure.


talk is cheap, supply exceeds demand
jerryr125
Creator III
Creator III
Author

Hi I removed the dimension and added the following as a measure:

=IF([intrppematerialid]='ppemat01',aggr(minstring(intrcomment),intrcomment))

 

Still no luck

Dalton_Ruer
Support
Support

Simply use MaxString(Comments) as the expression for the comments field unless there is some reason you literally only want to only show that particular location one time but if the others had multiple comments you would want to see them. 

MaxString.png