Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AGREGATION

  Good morning, please, i need some help on this.

How can i get,  with a table of this kind of data:

    

MARKETSTATE_NAMESum
spainAndalucia1
spainMadrid3
spainValencia5
spainGalicia7
portugalPorto2
portugalLisboa1
portugalSetubal2

Obtein an objct table like this:

 

STATE_NAMESum
Andalucia1
Madrid3
Valencia5
Galicia7
portugal5

Thanks a lot!

Belén

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Use the below calculated dimension in your chart.

=if(MARKET = 'spain', STATE_name,MARKET)

View solution in original post

12 Replies
luis_pimentel
Partner - Creator III
Partner - Creator III

The easiest way it will be in your load script, do something like:

LOAD

     MARKET,

     STATE_NAME,

     IF (MARKET = 'Portugal', 'Portugal', STATE_NAME) AS STATE_NAME_AUX

FROM yourfile...

and then use STATE_NAME_AUX as a dimension, and sum(yourvalue) as a expression.

Hope that helps.

MK_QSL
MVP
MVP

Can you share your application or sample file?

Not fully understood your requirement from your question

Not applicable
Author

What i want is to do it from the chart, in properties Dimension. As a calculated dimensión, if posible.

Thanks


Not applicable
Author

Hi,

Use the below calculated dimension in your chart.

=if(MARKET = 'spain', STATE_name,MARKET)

Not applicable
Author


Thanks Venugo, That fits with my problem.

Other question... it is possible, also with other file, ( also in the dimensión):

From this data:

 

MARKET
STATE_NAMESumChannel
spainAndalucia1C.C
spainMadrid3Other
spainValencia5On line
spainGalicia7Other
portugalPorto2On line
portugalLisboa1C.C
portugalSetubal2Other

Get a table object like this?  Taking  also On line and Portugal inside the table whith the state_name

STATE_NAMESum
Andalucia1
Madrid3
Galicia7
On line7
portugal3

Thanks a lot!

Belén

Not applicable
Author

Hi,

Try with below in your expression.

Sum({<Channel -= {'On line'}>}Sum)

Not applicable
Author

Is not working.....

=if(MARKET = 'spain', STATE_name,MARKET) Sum({<Channel -= {'On line'}>}Sum)

all together?


MK_QSL
MVP
MVP

Below should be in script

=if(MARKET = 'spain', STATE_name,MARKET as STATE_name


Below as table or chart expression.

Sum({<Channel -= {'On line'}>}Sum)

Not applicable
Author

Hi,

Use Dimension as : =if(MARKET = 'spain', STATE_name,MARKET)

and Expression could be : Sum({<Channel -= {'On line'}>}Sum)