Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

allocating sum according to calculated share

Hi,

I need to allocate products revenue to a certain product (service).

alloc1.png

My data:

allocdata.png

Only products that are marked with the flag "In Report?" should be taken into account.

The service product is marked with the flag "Service?".

I fail to achieve it with Set Analysis. Maybe it's not feasible?

I used the expression:

sum({<Service?={1}>}Revenue)
*
(
sum({<[In Report?]={1}>} Revenue)
/
sum( TOTAL{<[In Report?]={1}>} Revenue)
)

Attached is a sample model  I built.

Thanks in advance!

 

Labels (2)
1 Solution

Accepted Solutions
jochem_zw
Partner Ambassador
Partner Ambassador

please try

sum(total {<[Product Name]=,Service?={1}>}Revenue)
*
(
sum({<[In Report?]={1}>} Revenue)
/
sum( TOTAL{<[In Report?]={1}>} Revenue)
)

 

View solution in original post

2 Replies
jochem_zw
Partner Ambassador
Partner Ambassador

please try

sum(total {<[Product Name]=,Service?={1}>}Revenue)
*
(
sum({<[In Report?]={1}>} Revenue)
/
sum( TOTAL{<[In Report?]={1}>} Revenue)
)

 

dafnis14
Specialist
Specialist
Author

Brilliant!

 

Thanks!