Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Simulating values in a pivot table

I have  a set of costs represented in pivot table.  I want to simulate  "custom local" -- which is ok. BUt how can I get that simulated value to effect the total sum of "variable selling costs"?   the qlikview pivot table dismisses any modificaions made using IF function and calculates total sum value the initial input

I am successfully able to estimate/simulate "custom local" by multiplying it with a variable using a if function.

          Sum(Cost) *  if(Measure3 ='custom local',v_Custom_Local, 1)


but it doesnt get included in the total sum?     variable selling costs should be 171 and Custom costs should be 145.

costs.PNG

script is  the following


COST_TABLE:
LOAD * inline  [
Measure1,Measure2,Measure3,Cost
Variable Selling Costs,Custom costs,custom regional,15
Variable Selling Costs,Custom costs,custom local,13

];

let v_Custom_Local = 2; // returns the date serial number of today.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be this?

Sum(Aggr(Sum(Cost) *  if(Measure3 ='custom local',v_Custom_Local, 1), Measure1. Measure2, Measure3))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

May be this?

Sum(Aggr(Sum(Cost) *  if(Measure3 ='custom local',v_Custom_Local, 1), Measure1. Measure2, Measure3))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful