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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewlau120
Contributor
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
amrinders
Partner - Contributor II
Partner - Contributor II

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

marcus_sommer
MVP
MVP

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