I have a table with that looks like this:
How can I output all IDs that have more than 1 item associated to them? For example:
Note: ID's with only one item are not included. Thank you!
At Script level, you can use expression of count(Id) like:
if(count(Id)>1, Id) as newid
Group by Id;
At front end, you can use same expression as measures in table.
Thank you for the response. Yes it will work. But I forgot to mention that I also need to output the Items associated with those id's. Any idea on that? Thank you
You need to left join the original table, this option is good as far you don't have any other fields
Id as newid,
Are you looking to completely get rid of them in the script or are you just trying to flag them?
Just want to output them or maybe record them in a different table
load * inline [
1 , ItemA
5 , ItemF
4 , ItemS
4 , ItemG
5 , ItemI
1 , ItemZ
load * Where cnt > 1;
Concat(Item, ', '),
count(Item) as cnt
group by ID;
DROP Table source;
Thank you! Working well.
Retrieving data ...