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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Selected Item Will be part of Next Calculation

Hi All,

I have a chart which is having a percentage calculation (Blue Line) and two Adjustable Lines (Red Line) by Item Number.

The requirement is like we need to capture Items in two level:

1. All Items present in the chart (Assume no of Items X).

2. The Items present in between two Red Lines (Assume no of Items Y).

Now in the next sheet (Sheet4) we have another Line Chart. Which will show you:

(Values for Y) / (Values for X)

Could anyone help me to do this.

Thanks in advance for your help.

I am attaching the sample QVW.

Thanks,

Sarif

1 Solution

Accepted Solutions
sunny_talwar

May be this

=sum(Aggr(If(Sum(TOTAL <DIM_ITEM.ItemNumber> UnitsSold)*100/Max(TOTAL <DIM_ITEM.ItemNumber>ForecastQuantity) >= $(v_Min)

AND Sum(TOTAL <DIM_ITEM.ItemNumber>UnitsSold)*100/Max(TOTAL <DIM_ITEM.ItemNumber>ForecastQuantity) <= $(v_Max), Sum(LineSalesValue)), DIM_ITEM.ItemNumber, CstFiscalWeek)) /


sum(LineSalesValue)

View solution in original post

6 Replies
sunny_talwar

I am not sure I understand what is the expected or needed output you are looking to get. Would you be able to elaborate and/or give the more information about the output you are hoping to see?

mhmmd_srf
Creator II
Creator II
Author

Thanks Sunny for replying.

We have sheet3,where we have Line Chart showing Sales Order vs Forecast against Item Number.

There are two Adjustable Lines in Red color, changing with Adjustable Slider.

So there are few Items falling between two red lines (Lets assume no of Item falling between two red Lines = X)

And total no of Items present in this Chart (Lets assume no of Items = Y).

So in the Sheet 4, there is another chart, where we need calculation like below:

Sales for X no of Items / Sales for Y no of Items.

Is this understandable?

Please let me know.

Thanks in advance for your help.

Thanks,

Sarif

sunny_talwar

Not sure which one you want, but have a look

Capture.PNG

mhmmd_srf
Creator II
Creator II
Author

Thanks Sunny.. I need the second one.

This is coming correct.

But similar calculation I wanted for LineSalesValue also. But it is not working.

My Expression is like below:

I have added and attaching the qvw again. Could you please check my expression.

Thanks

Sarif

sunny_talwar

May be this

=sum(Aggr(If(Sum(TOTAL <DIM_ITEM.ItemNumber> UnitsSold)*100/Max(TOTAL <DIM_ITEM.ItemNumber>ForecastQuantity) >= $(v_Min)

AND Sum(TOTAL <DIM_ITEM.ItemNumber>UnitsSold)*100/Max(TOTAL <DIM_ITEM.ItemNumber>ForecastQuantity) <= $(v_Max), Sum(LineSalesValue)), DIM_ITEM.ItemNumber, CstFiscalWeek)) /


sum(LineSalesValue)

mhmmd_srf
Creator II
Creator II
Author

You have always been my life saver...and this time also.

Thank you so much Sunny. This is working perfectly.