Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option for the aggregation "concatenate" to only concatenate distinct values #671

Open
Seddryck opened this issue Dec 28, 2021 · 0 comments

Comments

@Seddryck
Copy link
Owner

At the moment if the field that must be concatenated contains the same value in different rows, this value is displayed multiple times in the concatenation.

Expl:

Supplier Fruit Qty
Foo Apple 50
Foo Apple 10
Foo Banana 20
Bar Apple 30

With the alteration

<summarize>
   <concatenation column="Fruit" type="text" separator=", "/>
   <sum column="Qty" type="numeric" />
   <group-by>
      <column identifier="Supplier">
   </group-by>
<summarize>
Supplier Fruit Qty
Foo Apple, Apple, Banana 80
Bar Apple 30

But with the new attribute distinct set to true of this aggregation, we're able to only have once the fruit apple for supplier Foo

<summarize>
   <concatenation column="Fruit" type="text" separator=", " distinct="true"/>
   <sum column="Qty" type="numeric" />
   <group-by>
      <column identifier="Supplier">
   </group-by>
<summarize>
Supplier Fruit Qty
Foo Apple, Banana 80
Bar Apple 30
@Seddryck Seddryck added this to the v2.1 milestone Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant