Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

how to get total for a certain level

Hi There,

I have got a question regarding how to get total value for a certain level.

For Example,

I have the table  as followings:

ALU    COLOR  STYLE SIZE  30DAY SALE Inventory  Months Supply

00001   blue       2001     M      20                  100          5

00002   white     2001     L       10                   30           3

If I want to calculate the months supply in style level, meaning that we can ignore the difference of ALU, COLOR and SIZE.

So the style level months supply is (100+30)/(20+10)=4.33

How can I form a expression of this?

Thank you so much!

Best Regards,

Gloria

3 Replies
MVP
MVP

Re: how to get total for a certain level

with total and angle brackets

sum (total <STYLE> Inventory)  / sum (total <STYLE> [ 30DAY SALE])

Not applicable

Re: how to get total for a certain level

Hi Massimo,

Thank you for your reply. However, this method doesn't give me the correct result. I don't know what went wrong. Is there any other way to get the same result above?

Thank you so much!

Best Regards,

Gloria

jsaradhi
Valued Contributor

Re: how to get total for a certain level

may be a sample qvw will help fix it...because Massimo's expression works for me.

145503.png

Community Browser