Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

Create dimention in as table - qlikview ( using aggr function in object )

Hi guys 

I am tryng to create an object according to customer Margins 

my data ( attached) include customer , sales and profit 

according to the rate of %profit = profit/sales 

create a table  : levels , number of customers  .

as well we need to  select the customers according to the level  .   

in the attached excel file , you will find data and the required output object  . 

thanks

gidon

 

1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

Yes you can implement through aggr in a calculated dimension;

=aggr(if(sum(profit/sales)>0.01 and sum(profit/sales)<0.08,
	'level1',
	if(sum(profit/sales)>0.09 and sum(profit/sales)<0.15,
		'level2',
		if(sum(profit/sales)>0.15 and sum(profit/sales)<0.50,
			'level3',
			'level4'
			)
		)
	),[Customer])

QVW attached ... I have personal edition, so not sure you will be able to do anything with it though.

Cheers,

Chris.

View solution in original post

7 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Not sure the numbers on your spreadsheet work or how you want to handle the ranges (<, <=, >, >=) but you could try a valuelist dimension & then use that in the expression, similar to this;

20211028_1.png

Cheers,

Chris.

gidon500
Creator II
Creator II
Author

Hi  Chris 

thanks for your mail . 

can you please load the qvw documents 

do you think we can implement  it by aggr function 

thanks

gidon

gidon500
Creator II
Creator II
Author

Hi  Chris 

thanks for your mail . 

can you please load the qvw documents 

do you think we can implement  it by aggr function 

thanks

gidon

chrismarlow
Specialist II
Specialist II

Hi,

Yes you can implement through aggr in a calculated dimension;

=aggr(if(sum(profit/sales)>0.01 and sum(profit/sales)<0.08,
	'level1',
	if(sum(profit/sales)>0.09 and sum(profit/sales)<0.15,
		'level2',
		if(sum(profit/sales)>0.15 and sum(profit/sales)<0.50,
			'level3',
			'level4'
			)
		)
	),[Customer])

QVW attached ... I have personal edition, so not sure you will be able to do anything with it though.

Cheers,

Chris.

gidon500
Creator II
Creator II
Author

Hi

thank you very much 

it works great 

gidon

Slotherworld
Contributor II
Contributor II

Thank you for posting something like this

Slotherworld
Contributor II
Contributor II


@chrismarlow wrote:

Hi,

Yes you can implement through aggr in a calculated dimension tellpizzahut ;

=aggr(if(sum(profit/sales)>0.01 and sum(profit/sales)<0.08,
	'level1',
	if(sum(profit/sales)>0.09 and sum(profit/sales)<0.15,
		'level2',
		if(sum(profit/sales)>0.15 and sum(profit/sales)<0.50,
			'level3',
			'level4'
			)
		)
	),[Customer])

QVW attached ... I have personal edition, so not sure you will be able to do anything with it though.

Cheers,

Chris.


 

This helps me....