Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to show unique values in the column - comment and it should be grouped based on survey name column.
I have attached the raw data and desired output. Is there any way where this can be done. Please help.
Thank you
To show unique values in the Comment column grouped by Survey Name , you can use the Aggr function with Concat to create a new field in your load script. Here’s how you can do it:
LOAD
[Survey Name],
Aggr(Concat(DISTINCT Comment, ', '), [Survey Name]) as GroupedComments
RESIDENT yourTable;
After reloading your data, you can use the new field GroupedComments in your straight table. This will show unique Comment values grouped by Survey Name.
@Sayed_Mannan - Thank you so much for your response.
I did something similar and created a new column with the formula: =Concat(aggr(if(Count(comment)>=1,comment),survey_name,comment),',')
To show unique values in the Comment column grouped by Survey Name , you can use the Aggr function with Concat to create a new field in your load script. Here’s how you can do it:
LOAD
[Survey Name],
Aggr(Concat(DISTINCT Comment, ', '), [Survey Name]) as GroupedComments
RESIDENT yourTable;
After reloading your data, you can use the new field GroupedComments in your straight table. This will show unique Comment values grouped by Survey Name.
To consolidate these values into one, there is an interesting tactic.
With your comment column sorted, in the color expression of the graphic text put:
Use the Up function to see the previous value and then hide the text with white color
if(only(comment) = Above(total comment), white())
*It can be useful, but it can also get confusing if you change the column sorting.*
- Matheus
@Sayed_Mannan - Thank you so much for your response.
I did something similar and created a new column with the formula: =Concat(aggr(if(Count(comment)>=1,comment),survey_name,comment),',')
Thank you so much for your response @MatheusC However, there is a huge possibility that the user may sort the data. I have shared my solution.