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

witch formula for doing that

hi,

i have 3 dimensions and datas :

cost_center, nbex, nbdays

103601, 178359, 26

103602, 73557, 26

103603, 70689, 26

in a formula, i want to calculate the average nbex per day :

178359/26 + 73557/26 + 70689 / 26

that is : 6859 + 2829 + 2719 = 12407

of course sum(nbex) / sum(nbdays) doesn't work.

could anyone help me ?

thank you very much.

1 Solution

Accepted Solutions
sunny_talwar

If you got the solution using my response above, I would suggest you to mark my response as correct and/or helpful instead of marking your own as helpful. This will help future visitors.

Qlik Community Tip: Marking Replies as Correct or Helpful

Thanks,

Sunny

View solution in original post

9 Replies
sunny_talwar

Try this

Sum(nbex/nbdays)

doespirito
Creator
Creator
Author

ok thank you,

i have set analysis for each part :

sum({<RATIO={'EXPOR'}>} REEL_RAT)/sum( {<RATIO={'NBPAR'}>} REEL_RAT)

how to transform in Sum(nbex/nbdays) ?

sunny_talwar

May be this:

Sum({<RATIO={'EXPOR', 'NBPAR'}>}nbex/nbdays)

doespirito
Creator
Creator
Author

REEL_RAT contains nbex with set analysis {<RATIO={'EXPOR'}>}

and nbdays with set analysis {<RATIO={'NBPAR'}

so it's difficult to do this

sunny_talwar

Do you have a sample where you can share? Without knowing your data, it would be difficult for me to propose anything here

doespirito
Creator
Creator
Author

thank you

here is my exemple,

i want 12407 and not 4136

sunny_talwar

Try this:

='wrong total : '&num(Sum(Aggr(Sum({<RATIO={'EXPOR'}>} REEL_RAT)/sum( {<RATIO={'NBPAR'}>} REEL_RAT), COST_C)),'# ##0')

doespirito
Creator
Creator
Author

yes it works fine...

thanks a lo

sunny_talwar

If you got the solution using my response above, I would suggest you to mark my response as correct and/or helpful instead of marking your own as helpful. This will help future visitors.

Qlik Community Tip: Marking Replies as Correct or Helpful

Thanks,

Sunny