Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
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

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

ajsjoshua
Specialist
Specialist

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

ajsjoshua
Specialist
Specialist

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

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

BTW tres has your solution.

ajsjoshua
Specialist
Specialist

Thank u sir.

ajsjoshua
Specialist
Specialist

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)