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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

using "Max" in an expression

Hi

I have the following table in Qlikview.

Account     AccountName     ProductName    

050250       Tennisan                Apples

050250     Tennisan              Oranges

059300     Geoarges              Apples

But I only want Tennisan to show up once with Oranges, Apples as the ProductName.  Is this possible?

Like this:-

Account     AccountName     ProductName    

050250     Tennisan              Apples, Oranges

059300     Geoarges              Apples

Cheers,

LC

1 Solution

Accepted Solutions
sunny_talwar

I think you missed the Group By statement.


Entitlements:

LOAD.....

Group By Account, AccountNumber;

Select .....

View solution in original post

8 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

How did you decide that the Account should be 050250 not 50250?

Screenshot_1.jpg

Anonymous
Not applicable
Author

whoops.  typo.  ive updated

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use Account and AccountName as dimensions and as expression Concat(Distinct ProductName).


talk is cheap, supply exceeds demand
sunny_talwar

I guess it is a typo... I would do something like this:

LOAD Account,

          AccountName,

          Concat(ProductName) as ProductName

FROM .....

Group By Account, AccountName;

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Table:

Load AccountName

  ,ProductName

  ,Text(Account) as Account

Inline [

Account,     AccountName,     ProductName   

50250,       Tennisan,                Apples

050250,     Tennisan,              Oranges

059300,    Geoarges,              Apples

];

QUALIFY *;

tmb:

LOAD AccountName

  ,Concat(ProductName, ',') as ProductName

Resident Table

Group By AccountName

;

UNQUALIFY *;

The result:

Screenshot_1.jpg

Anonymous
Not applicable
Author

Hi Sunny,

I've added Concat(ProductName) as ProductName to my script.

I'm getting the following error when uploading the attached:-

OLEDB read failed

sunny_talwar

I think you missed the Group By statement.


Entitlements:

LOAD.....

Group By Account, AccountNumber;

Select .....

Anonymous
Not applicable
Author

Thanks Sunny