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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

May be like this:

Dimension:

Left(code, 3)

Expression:

Sum(Amount)

Clever_Anjos
Support
Support

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.