Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group distinct values

Good morning, I have this problem:

I have two fields in a table. In a column there is a code (for example OLX111, SDO123, etc.) and in the second column is the amount.
How can I group the values of the first column? I would group them for the first three characters.


Regards

Labels (1)
4 Replies
sunny_talwar

May be like this:

Dimension:

Left(code, 3)

Expression:

Sum(Amount)

Clever_Anjos
Employee
Employee

Something like this?

LOAD

    LEFT(Code,3) as NewCode,

    Sum(Ammount) as SumAmmount

Resident yourtable

Group by LEFT(Code,3) ;

Not applicable
Author

Thanks Cleber, it's work correctly.

Not applicable
Author

Thanks Sunny, it's ok.