Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Highlighted
matthewlau120
New Contributor

Do a Cost Allocation in set Analysis

Dear all,

 

I would like to exclude the others category in the screenshot and  evenly allocated its value into other categories, for example: 32000 should divide 5 and allocate into other categories. Would anyone feel free to help?

 

its set expression:Sum(Amount)-sum( {<NewType={"Others"}>}Amount) 

 

Screenshot 2019-03-14 at 5.33.40 PM.png

2 Replies
Partner
Partner

Re: Do a Cost Allocation in set Analysis

Hi Matthew,

 

Create a variable in which you have to calculate sum of amount for only Others and divide it by distinct  count of New Type Field (Excluding Others). Then in your pivot/table you have to exclude 'Others' in your Dimension and in Measure you can write Sum({<NewType-={'Others'}>}Amount)+ $(vOthers).

 

Regards,

Amrinder

MVP & Luminary
MVP & Luminary

Re: Do a Cost Allocation in set Analysis

Maybe something like this might be helpful in your case:

sum({<NewType -= {'Others'}>} Amount) +
   (sum({1<NewType = {'Others'}>} Amount) *
        (sum({<NewType -= {'Others'}>} Amount) / sum({<NewType -= {'Others'}>} TOTAL Amount)))

- Marcus