Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ajsjoshua
Specialist
Specialist

sales value in SKU wise

Hi all,

I am using the formula =Sum({$<Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))},Years=,Months= >}Sales)

and i am getting the overall sales value for all SKU.

i want sales value for one SKU to be displayed without selecting a particular SKU.

Anyone help me.

Thanks in Advance

Regards,

Joshua.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be this?

=

If(GetSelectedCount(SKU)>0,

          Sum({$<Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))}>}Sales) ,

          Sum({$< SKU ={SKUValue1},Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))}>}Sales)

)

View solution in original post

11 Replies
tresesco
MVP
MVP

Assuming SKU is a field here. Try like:

=Sum({$< SKU={SKUValue1},Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))},Years=,Months= >}Sales)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Why are you specifying Years and Months twice in your set analysis?

ajsjoshua
Specialist
Specialist
Author

But at the same time end user should view other SKU sales also.How it can be achieved?

ajsjoshua
Specialist
Specialist
Author

If i didnt specify twice the values are not changing during year selection in listbox.

thank u

tresesco
MVP
MVP

If you want users' selection+one specific SKU, then try with  '+'  like:

=Sum({$< SKU +={SKUValue1},Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))}>}Sales)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Omit the Years=, Months= combo then. They actually serve to clear all selections for this sum, which is not what you intend to do.

The other specifications Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))} will select the highest currently selected value from both listboxes, whether you actively select some (green selections) or non (all white).

Peter_Cammaert
Partner - Champion III
Partner - Champion III

BTW tres has your solution.

ajsjoshua
Specialist
Specialist
Author

Thank u sir.

ajsjoshua
Specialist
Specialist
Author

Peter if i use SKU this formula a particular SKU is hardcoded but i want the values to be changed when the user selects different SKU also


=Sum({$< SKU +={SKUValue1},Years = {$(=max(Years))},MonthID1={$(=Max(MonthID1))}>}Sales)