Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Move calculations from expressions to the load script

I need some help to move 13 calculations from a pivot expressions to the load script and to create the 14th calculation that will add the results of previous 12. The formulas works with previous loaded fields and will then be used to create visualizations. I'm attaching some dummy data as reference. Any suggestions will be greatly appreciated.

1 Reply
johncaqc
Not applicable

Re: Move calculations from expressions to the load script

Hard to say but it looks like you might just take each expression, such as AA below,

=IF(

IsNull([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]), '',

  IF([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]='Meets', 14,

  IF([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]='Missed', 0,

  IF([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]='NA',''))))

and place it into the script in a preceding load statement to your table and give it a field name, one for each expression, a la;

IF(

IsNull([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]), '',

  IF([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]='Meets', 14,

  IF([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]='Missed', 0,

  IF([calls - Identifies Reason for Call/Clarifies and Probes (Weight 14pts) *]='NA','')))) as AA

Then, in a preceding preceding load add the new fields together, a la;

AA + Ab + AC... as Combined

I would start this way.