<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3174073825360154810</id><updated>2026-03-14T17:57:30.506-04:00</updated><category term="loadscript"/><category term="expression"/><category term="chart"/><category term="variables"/><category term="selection"/><category term="field names"/><category term="toolkit"/><category term="macros"/><category term="sheet object"/><category term="script"/><category term="dimension"/><category term="performance"/><category term="set analysis"/><category term="memory"/><category term="bookmarks"/><category term="vbscript"/><category term="partial reload"/><category term="tutorial"/><category term="file size"/><category term="qvd"/><category term="text files"/><category term=".bat script"/><category term="Oracle"/><category term="command line"/><category term="errors"/><category term="qvw"/><category term="trigger"/><category term="copy chart"/><category term="optimized load"/><category term="alternate states"/><category term="automation"/><category term="data compression"/><category term="drop table"/><category term="image"/><category term="reference manual"/><category term="table names"/><category term="weekstart"/><title type='text'>QlikView Maven</title><subtitle type='html'>How to do it notes and tutorial from a &lt;i&gt;QlikView&lt;/i&gt; Desktop user who uses QlikView for data analysis and helps clients and co-workers get the most out of their data. A mix of tips for both beginners and advanced users with a focus on things you won&#39;t find in the manual.&#xa;QlikView is one of the most useful data review and analysis tools available for people who make sense of data for a living.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>115</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2993438916195764293</id><published>2018-05-04T16:39:00.001-04:00</published><updated>2018-05-07T11:06:16.407-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="file size"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><title type='text'>Loading a 1% Random Sample</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtcHCcjCMu90Hcst5IYHIX7EySuiCYNJELWNvh5DyqNrvTViodr89MmvMWCE5LDef8wSjSMpiAyk59pnLyIZn_bWeDzZgu_AkhSXbo0yFGcT8D6zUt3KctEG9aHtIsTl5iDpd3QOleocCo/s1600/flower.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;855&quot; data-original-width=&quot;570&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtcHCcjCMu90Hcst5IYHIX7EySuiCYNJELWNvh5DyqNrvTViodr89MmvMWCE5LDef8wSjSMpiAyk59pnLyIZn_bWeDzZgu_AkhSXbo0yFGcT8D6zUt3KctEG9aHtIsTl5iDpd3QOleocCo/s320/flower.JPG&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I needed to load a one percent random sample of a large file last week. I’m sure others have figured out this method but this was the first time I coded it like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;MYSAMPLE:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Load * from MYFILE.qvd (qvd)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Where Rand()&amp;lt;=0.01;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The &lt;i&gt;Rand&lt;/i&gt; function returns a random value between 0 and 1. In the load statement above it would only be true 1% of the time (approximately) -- that would load only 1% of the rows. If it was coded as Where Rand()&amp;lt;=0.20 then it would be a 20% random sample, etc.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This method can be used with almost &lt;i&gt;any &lt;/i&gt;Load statement even one of the steps in a preceding load.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Note that we&#39;re talking about random numbers here so the total number of rows loaded using this technique will not be exactly 1% of the total rows in the file, although it will be close especially when the total number of rows in the file is very large. Be aware too that the rows that get loaded will not be an evenly distributed sample of rows although it will be close.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; ★★★&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2993438916195764293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/2993438916195764293' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2993438916195764293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2993438916195764293'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2018/05/loading-1-random-sample.html' title='Loading a 1% Random Sample'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtcHCcjCMu90Hcst5IYHIX7EySuiCYNJELWNvh5DyqNrvTViodr89MmvMWCE5LDef8wSjSMpiAyk59pnLyIZn_bWeDzZgu_AkhSXbo0yFGcT8D6zUt3KctEG9aHtIsTl5iDpd3QOleocCo/s72-c/flower.JPG" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-537339649098080973</id><published>2018-03-14T16:54:00.000-04:00</published><updated>2018-03-15T09:12:34.377-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="toolkit"/><title type='text'>Rename a Cycle Group</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdI_e2XVuBbz-4v7rzM5XOswOwSSdjr7y8ke6TDmJexSvrz9OAKGFzt2GtBt8Yb3M7LdUxiTi3gWViVNpeILYT2c_sqCqxY9ArBA2rgTSunLW58t-Nft3DSlaSo6wprXtru-gVTUNJFMaZ/s1600/blueburst.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdI_e2XVuBbz-4v7rzM5XOswOwSSdjr7y8ke6TDmJexSvrz9OAKGFzt2GtBt8Yb3M7LdUxiTi3gWViVNpeILYT2c_sqCqxY9ArBA2rgTSunLW58t-Nft3DSlaSo6wprXtru-gVTUNJFMaZ/s320/blueburst.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I often use Rob
Wunderlich’s excellent Copy Groups utility to copy cycle groups from one
QlikView document to another; or to copy a cycle group from a document back
into the same document to make a duplicate (to see the utility and get your own
copy, search on ”QlikView Cookbook Copy Groups Utility”). But, sometimes after copying
the cycle group, the name of the group may not be ideal. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Author&#39;s note:&amp;nbsp; I removed the rest of this post after seeing Andre&#39;s comment. Thanks, Andre - that was something I didn&#39;t know... and it&#39;s much simpler than what I wrote.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;;&quot;&gt;Portion of Andre&#39;s comment:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;A group can be renamed by going to Document
Properties | Groups | Select Group | Edit | Enter New Name | OK&lt;br /&gt;
&lt;br /&gt;
This changes where the group is used in a chart dimension as well&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;/span&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/537339649098080973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/537339649098080973' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/537339649098080973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/537339649098080973'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2018/03/rename-cycle-group.html' title='Rename a Cycle Group'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdI_e2XVuBbz-4v7rzM5XOswOwSSdjr7y8ke6TDmJexSvrz9OAKGFzt2GtBt8Yb3M7LdUxiTi3gWViVNpeILYT2c_sqCqxY9ArBA2rgTSunLW58t-Nft3DSlaSo6wprXtru-gVTUNJFMaZ/s72-c/blueburst.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3240885213261099437</id><published>2018-01-19T16:36:00.003-05:00</published><updated>2018-01-19T16:36:42.500-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>Utility That Can Extract and Show All of the Variables from Your QlikView Document</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKVhaNZf5mbcizmubBY8NTglACSjhTWPPnRE-qaZk0x2C-QiEy90VFt_E5HYQ-G-YkhBtr93V4DeU4UCFbnfUebtNOY37cBpC-3tX6hEfEI5TomVzrVEwi2vu8MAhC7nVbLMmc9IvfpluS/s1600/waterlily.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKVhaNZf5mbcizmubBY8NTglACSjhTWPPnRE-qaZk0x2C-QiEy90VFt_E5HYQ-G-YkhBtr93V4DeU4UCFbnfUebtNOY37cBpC-3tX6hEfEI5TomVzrVEwi2vu8MAhC7nVbLMmc9IvfpluS/s320/waterlily.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Some of our
project teams at work are required to use a standard QlikView document for
several clients and then use a client-specific loadscript &lt;i&gt;.qvs&lt;/i&gt; file to
configure custom variables for each client. The loadscript files define the
variables with a set of &lt;b&gt;Let &lt;/b&gt;statements and I often get questions about the
syntax for the Let statements. Some of the variables define complex expressions
and they include dollar signs and functions and quotes and some definitions use
multiple lines so the Let statement syntax can get tricky.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I recommend
that people do their development first so that they have a working document
with all of the desired features and variables that are required. Then, they
can use a QlikView document I wrote to be used as a utility program to help
people with managing their variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;You can
download a working copy of the utility program, named List_Out_Variables.qvw,
by clicking &lt;a href=&quot;https://drive.google.com/open?id=1JF3234GCrnF5Z6LOeedvR715n3Y7Wlcs&quot; target=&quot;List_Out_Variables.qvw Utility&quot;&gt;&lt;i&gt;&lt;b&gt;HERE&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The utility
program has a tab with some text instructions and an input box where people
type in the complete pathname to the custom .qvw document that they’ve been working
on. Then, they do a reload of the utility program and it extracts all of the
variables from the custom document.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The input box
stores the pathname in a variable named &lt;i&gt;vDocumentPath&lt;/i&gt;. Part of the loadscript in the
utility program looks like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;VARIABLES:&lt;br /&gt;
LOAD&lt;br /&gt;
&amp;nbsp; [Name] as VARIABLE_NAME,&lt;br /&gt;
&amp;nbsp; [RawValue] as VARIABLE_VALUE&lt;br /&gt;
FROM&amp;nbsp; $(vDocumentPath) (XmlSimple, Table
is [DocumentSummary/VariableDescription]); &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;That loadscript
code extracts the variables from the document and makes the variable names and
values available to be shown in charts. (I borrowed the loadscript code from a
Rob Wunderlich comment I found in QlikCommunity.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The second tab
on the utility is pretty simple, it is table box showing the VARIABLE_NAME and
VARIABLE_VALUE fields along with list boxes for those two fields so that people
can select the variables they are interested in. The utility is pretty useful
right there as a way to analyze variables, sort them, print them, copy and
paste to other documents, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;There is a third
tab with a chart that helps people with the &lt;i&gt;Let statement&lt;/i&gt; syntax that I
mentioned. The chart on that tab uses VARIABLE_NAME as the dimension but I
found it helps to have the dimension column hidden. Then, there is one
expression that converts the VARIABLE_VALUE into a Let statement. The
expression looks like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&#39;Let &#39;&amp;amp;VARIABLE_NAME&amp;amp;&#39;=&#39;&amp;amp;chr(39) &amp;amp; &lt;br /&gt;
Replace(Replace(Replace(VARIABLE_VALUE,vQUOTE,vQR),vDOLLAR,vDR),vCR,vCRR) &lt;br /&gt;
&amp;amp; chr(39)&amp;amp;&#39;;&#39; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;An example of
how that looks in the actual chart is:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;Let
MoneyFormat=&#39;&#39;&amp;amp;chr(36)&amp;amp;&#39;#,##0.00;(&#39;&amp;amp;chr(36)&amp;amp;&#39;#,##0.00)&#39;;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;To make that
work I had to define a few variables in the utility program. It made that text expression
much simpler to write. The variables in the utility program are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;vDollar&lt;/i&gt; is a variable
containing a single dollar sign&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;vQuote&lt;/i&gt; is a
variable containing a single quote&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;vCR&lt;/i&gt; is a
variable containing a carriage return (really simple, when defining this one
just put your cursor in the variable definition window and click your &lt;i&gt;Enter&lt;/i&gt;
key).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;vQR&lt;/i&gt; is&amp;nbsp; &#39;&amp;amp;chr(39)&amp;amp;&#39;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;vDR &lt;/i&gt;is&amp;nbsp; &#39;&amp;amp;chr(36)&amp;amp;&#39;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;vCRR&lt;/i&gt; is&amp;nbsp; &#39;&amp;amp;chr(13)&amp;amp;&#39;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;If you download a copy of the utility program then you don&#39;t have to worry about any of that coding as it is already done for you.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;After loading a set of variables extracted from your special document, my instructions
tell people to make their selections and then, from the chart, they can
right-click and export the chart or copy the data to the Windows clipboard so
it can be pasted into a .qvs file or pasted into a loadscript or pasted in some other document.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Having an easy method to define a set of variables as &lt;i&gt;Let &lt;/i&gt;statements can be used to copy
variables from document to document or to accompany a version control process
where variables and their values need to be stored as text in a way that allows
them to be analyzed or restored later. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Some folks
familiar with this blog may remember that several years ago I wrote about an
Excel spreadsheet containing a macro that could extract QlikView variable names
and values. It worked great but is no longer useful in our corporate
environment as the corporate anti-malware software considers it a “suspicious
program” and refuses to let it run. The &lt;i&gt;List_Out_Variables.qvw&lt;/i&gt; utility is a
good replacement. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui symbol&amp;quot; , sans-serif; mso-bidi-font-family: &amp;quot;Segoe UI Symbol&amp;quot;;&quot;&gt;★★★&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3240885213261099437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/3240885213261099437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3240885213261099437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3240885213261099437'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2018/01/utility-that-can-extract-and-show-all.html' title='Utility That Can Extract and Show All of the Variables from Your QlikView Document'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKVhaNZf5mbcizmubBY8NTglACSjhTWPPnRE-qaZk0x2C-QiEy90VFt_E5HYQ-G-YkhBtr93V4DeU4UCFbnfUebtNOY37cBpC-3tX6hEfEI5TomVzrVEwi2vu8MAhC7nVbLMmc9IvfpluS/s72-c/waterlily.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1027751319944241828</id><published>2017-05-27T14:15:00.001-04:00</published><updated>2017-05-31T15:51:13.721-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="field names"/><category scheme="http://www.blogger.com/atom/ns#" term="macros"/><category scheme="http://www.blogger.com/atom/ns#" term="text files"/><category scheme="http://www.blogger.com/atom/ns#" term="toolkit"/><title type='text'>Data Profile Tool</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsIKDuqFsiIBi-uDKSkxXvwLESde6E7p3IJKxkQmx4OUNzhPUYaaS71KH6kCEuCsPTppCPmCJNHFxKzYUhv3eR9SY1iVC6qp71NlLGhUk2F7eXFoVHZ1i8tDwumMWni4637P0hPkGl1KI/s1600/tubular.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;855&quot; data-original-width=&quot;570&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsIKDuqFsiIBi-uDKSkxXvwLESde6E7p3IJKxkQmx4OUNzhPUYaaS71KH6kCEuCsPTppCPmCJNHFxKzYUhv3eR9SY1iVC6qp71NlLGhUk2F7eXFoVHZ1i8tDwumMWni4637P0hPkGl1KI/s320/tubular.jpg&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I’ve written in
this blog before about how I’m often called on to validate a new data file from
a client or to examine a new data extract. My first step is to load data into a
copy of Steve Dark’s&lt;/span&gt; &lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Data Profiler&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;(Steve&#39;s original post is useful - search on&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;quickintelligence data profiler&lt;/i&gt;). The data
profiler gives me information about exactly what values exist in each of the
fields. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I’ve made a few
modifications to Steve’s original document:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Added a table
box that adjusts itself to the fieldnames in the file&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Added a small
macro that updates the Statistics Box with the fieldname automatically as
different fieldnames are selected. A trigger detects the change and automatically configures the Statistics Box&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Added a tab to
help search for duplicate values in either a field or combination of fields&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;A check in the loadscript to see if the file exists and if it does not exist then it opens a msgbox from the loadscript using a function&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;You can
download an example copy of the file data profiler that I use by clicking &lt;a href=&quot;https://drive.google.com/open?id=0B_ZjGEqKdRhwbHhRZWE2VlFfbDg&quot; target=&quot;Data Profiler Tool&quot;&gt;&lt;i&gt;&lt;b&gt;HERE&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
.&lt;o:p&gt;&lt;/o:p&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I also keep a
version of the data profiler that is tailored for loading data from an Oracle
table and a version of the profiler tailored for loading data from a qvd file. I
think I use the data profiler tools almost every day to examine data in files and
tables to help with QlikView document design and other reporting requirements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;These two examples have no data loaded - you will have to do a reload yourself from your own data:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;You can download an example copy of the profiler I use for qvd files by clicking &lt;a href=&quot;https://drive.google.com/open?id=0B_ZjGEqKdRhwal9QTmw2Z3R4Mmc&quot; target=&quot;Data Profiler Tool&quot;&gt;&lt;i&gt;&lt;b&gt;HERE&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;You can download an example copy of the profiler I use for Oracle tables by clicking &lt;a href=&quot;https://drive.google.com/open?id=0B_ZjGEqKdRhwZU1YVTdRcmgzY1k&quot; target=&quot;Data Profiler Tool&quot;&gt;&lt;i&gt;&lt;b&gt;HERE&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui symbol&amp;quot; , sans-serif; mso-bidi-font-family: &amp;quot;Segoe UI Symbol&amp;quot;;&quot;&gt;★★★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1027751319944241828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/1027751319944241828' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1027751319944241828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1027751319944241828'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2017/05/data-profile-tool.html' title='Data Profile Tool'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsIKDuqFsiIBi-uDKSkxXvwLESde6E7p3IJKxkQmx4OUNzhPUYaaS71KH6kCEuCsPTppCPmCJNHFxKzYUhv3eR9SY1iVC6qp71NlLGhUk2F7eXFoVHZ1i8tDwumMWni4637P0hPkGl1KI/s72-c/tubular.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2454494623332465114</id><published>2017-05-14T11:29:00.000-04:00</published><updated>2017-05-15T11:17:07.681-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="field names"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Have you got a function similar to SQL NVL ?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-BFsa8SGfds9AbE_c9OqDBIULSUYxfUdXd-xZduOZabkfspyndq9mU8xay4Y5SPPA325q-T8sY9kJfMqe3tU7OAN4NfymoDEdfQsZFC1xt1WY24QX9C5xJtS3pT2A9vqSYv7xWB15kQPP/s1600/no_tooth.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-BFsa8SGfds9AbE_c9OqDBIULSUYxfUdXd-xZduOZabkfspyndq9mU8xay4Y5SPPA325q-T8sY9kJfMqe3tU7OAN4NfymoDEdfQsZFC1xt1WY24QX9C5xJtS3pT2A9vqSYv7xWB15kQPP/s320/no_tooth.jpg&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I work with a
group of people who are all experts in SQL. They all also have varying levels
of technical skills and QlikView skills. One question I get frequently is
whether QlikView has a function like the SQL &lt;i&gt;NVL&lt;/i&gt; function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;For those of
you not familiar with relational database SQL language, the &lt;i&gt;NVL&lt;/i&gt; function takes
two arguments: a field name or expression and a default value to be returned if
the first argument is null. For example, a SQL database query may include the
function like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; NVL(ORD_DISCOUNT, 0) AS ORD_DISCOUNT &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;And that would
tell the SQL processor to look at the value of ORD_DISCOUNT and if it is null
then return 0 as the function value otherwise return ORD_DISCOUNT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;When people ask
about achieving the same thing with QlikView, I usually start by telling them
that they can code an “if” statement like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; If(IsNull(ORD_DISCOUNT),
0, ORD_DISCOUNT)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;and then I explain that there is a
built-in QlikView function that can be used similar to NVL as long as the field you are checking is supposed to be numeric. It is the &lt;i&gt;Alt&lt;/i&gt;
function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The Alt
function accepts any number of arguments and looks at each of them going from
left to right and returns whichever one is a valid number. So, repeating our
example, if ORD_DISCOUNT is null then the following function will return a
zero but if ORD_DISCOUNT is a valid number then the function returns ORD_DISCOUNT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;Alt(ORD_DISCOUNT,
0) &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The Alt
function will treat the last or rightmost argument as an “else” condition and return
that value if none of the preceding arguments are numeric. The rightmost value
need not be numeric so you could code something like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&amp;nbsp; Alt(ORD_DISCOUNT,
&#39;Discount is missing&#39;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The Alt function
may be used in the loadscript code or in chart expressions. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;If you are
interested, the QlikView Help (search in Help for &lt;i&gt;Conditional Functions&lt;/i&gt;) shows
an interesting example for how the Alt function can be used to identify a date
when the date value may be any one of several different date formats. &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui symbol&amp;quot; , sans-serif; mso-bidi-font-family: &amp;quot;Segoe UI Symbol&amp;quot;;&quot;&gt;★★★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2454494623332465114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/2454494623332465114' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2454494623332465114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2454494623332465114'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2017/05/have-you-got-function-similar-to-sql-nvl.html' title='Have you got a function similar to SQL NVL ?'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-BFsa8SGfds9AbE_c9OqDBIULSUYxfUdXd-xZduOZabkfspyndq9mU8xay4Y5SPPA325q-T8sY9kJfMqe3tU7OAN4NfymoDEdfQsZFC1xt1WY24QX9C5xJtS3pT2A9vqSYv7xWB15kQPP/s72-c/no_tooth.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3204415693715248388</id><published>2017-04-05T12:25:00.001-04:00</published><updated>2017-04-06T09:12:21.162-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><title type='text'>Converting Edited Number Text into a  Numeric Field</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jsmxPnu5Uiq1-ofsGHBDEEAzhdckzfw2LV3O1wyAENh6WqyxISn_YrNsf5hHWmCmGzpXTbytilYo_vY-1X485okE5sL0y3DGs3iSQo6LDl7YxL5OrkxeN36tLrU4doMx7aT3BJckUVUl/s1600/lucy_tree.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jsmxPnu5Uiq1-ofsGHBDEEAzhdckzfw2LV3O1wyAENh6WqyxISn_YrNsf5hHWmCmGzpXTbytilYo_vY-1X485okE5sL0y3DGs3iSQo6LDl7YxL5OrkxeN36tLrU4doMx7aT3BJckUVUl/s320/lucy_tree.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;My co-worker,
Naveen, had a requirement for a document that would load some financial data from
a file that a client had sent to us. The client had created the file with a “screen
scraping” type of application that captured the number fields as edited numeric
text. For example, a field might contain &amp;nbsp;($3,046.10) &amp;nbsp;&amp;nbsp;So, that example includes a dollar sign, comma
as a thousands separator, period as a decimal point, and parenthesis to
indicate a negative number or credit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Naveen needed
to load the data as a number. Here’s how it was done: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;We used two
functions. A &lt;i&gt;Num#&lt;/i&gt; function converted the text string into a &lt;i&gt;dual&lt;/i&gt; field
containing both a text portion and a numeric portion. Then, an outer &lt;i&gt;Num&lt;/i&gt; function
extracted just the numeric portion. For example, one of the number fields was
named AUG. In the loadscript, the line that converted the edited number into a
simple numeric field looked like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Num(Num#(AUG, &#39;$#,##0;($#,##0)&#39;))&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;The edit
string or format code, the part within the single quotes, can vary depending on your
requirement. The edit string I used in the example is a good one for the kind
of editing you might find in a financial spreadsheet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Here&#39;s a few other examples of edited number text and how it looks after using this expression:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background: white; border: 1pt outset silver;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: whitesmoke; border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;AUG&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: whitesmoke; border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;Num(Num#(AUGUST,&#39;$#,##0;($#,##0)&#39;))&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$1,251&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;1251&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$1,465&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;1465&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$1,466&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;1466&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$3,724&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;3724&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;$4,158&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;4158&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;($11)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;-11&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;($132)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;-132&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;($2)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;-2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;($4)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;-4&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;What now?&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(this is a
  null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;19&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;19&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;25.12&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;25.12&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;25.1234&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;25.1234&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;25.3&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;25.3&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;2,070&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1pt inset silver; padding: 1.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #363636; font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;2070&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;lucida console&amp;quot;; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui symbol&amp;quot; , sans-serif; mso-bidi-font-family: &amp;quot;Segoe UI Symbol&amp;quot;;&quot;&gt;★★★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3204415693715248388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/3204415693715248388' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3204415693715248388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3204415693715248388'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2017/04/converting-edited-number-text-into.html' title='Converting Edited Number Text into a  Numeric Field'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jsmxPnu5Uiq1-ofsGHBDEEAzhdckzfw2LV3O1wyAENh6WqyxISn_YrNsf5hHWmCmGzpXTbytilYo_vY-1X485okE5sL0y3DGs3iSQo6LDl7YxL5OrkxeN36tLrU4doMx7aT3BJckUVUl/s72-c/lucy_tree.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1618022692456161898</id><published>2016-12-28T13:03:00.000-05:00</published><updated>2016-12-31T12:40:35.420-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="set analysis"/><title type='text'>Straight Table with Different Expressions on Each Row</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUwVaGFgiQ5fxAE8R6hHnj4xE2oIblYsTrMLtnB5jtg-apAqQLV0jD_HBBEARQqEnMpQPFeaTAYdBtZfFluGXziCYaCeigFH5SBSalCy37tI8E-QEgLg_it6kuLsSPNSO2qSKeSn9Z2bme/s1600/beachsunrise.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUwVaGFgiQ5fxAE8R6hHnj4xE2oIblYsTrMLtnB5jtg-apAqQLV0jD_HBBEARQqEnMpQPFeaTAYdBtZfFluGXziCYaCeigFH5SBSalCy37tI8E-QEgLg_it6kuLsSPNSO2qSKeSn9Z2bme/s320/beachsunrise.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;We had a
requirement a few months back for a document that would show a table with
different expressions on each row along with some subtotals and expressions
that reference other rows and columns. It needed to be a single table that
could be sent to Excel. It was obviously a requirement that grew out of
existing, legacy reporting solutions using Excel but many corporations are
wedded to Excel and the larger the corporation, the harder it is to find anyone
who believes they have the authority to make changes or do something different.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The solution
was to build a document with a straight table with a single dimension that is
loaded in the loadscript with an inline load like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;TBL_KPI_TYPE:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;LOAD * INLINE [&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;KPI_NO,
KPI_TYPE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;1,
Transportation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;2, Intermodal %
of Miles&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;3, Sea % &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;4, LTL % &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;5, Avg
Pallets/Truck &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;6, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;7, Total Diesel
Cost&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;8, Diesel
$/Gallon&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;9, Diesel # of
Gallons&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;10, Average
distance to Customers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;];&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The straight
table used KPI_TYPE as the dimension so those text values get listed in the
leftmost column like any other dimension. The chart expression had to be
slightly different for each column -- some columns were fiscal months, some fiscal quarters, one was a year-to-date column -- but they all looked something like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;Pick(KPI_NO, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&#39;&amp;nbsp;&amp;nbsp;&#39;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(v.intermodel_pcent_miles),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(v.sea_pcent),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(ltl_pcent),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(avg_palletspertruck),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&#39;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(total_diesel),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(diesel_price),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(diesel_tot_gallons),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(avg_dist_to_cust)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This is
simplified from the actual document.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Note that the
&lt;i&gt;Pick&lt;/i&gt; function in the expression uses &lt;i&gt;KPI_NO&lt;/i&gt; which is defined in the inline
load. The Pick function avoids “if” statements that can affect speed
performance for the table as users change their selections.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The dimension
isn’t a real data field. Each line in the expression must use the appropriate
field names and set analysis to satisfy the requirement for the row. In the
example above, variables are used for each row to help make the overall
expression understandable at a glance.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Because each
row is a different expression, the formatting must be done within the
expression in the variable using the &lt;i&gt;Num&lt;/i&gt; function. Some of those rows are
integers, some are in thousands, some are money and some are percentages.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Because some of
the expressions referred to other rows and columns (using the &lt;i&gt;Above&lt;/i&gt; and
&lt;i&gt;RangeSum&lt;/i&gt; functions), I had to turn off the ability to drag and drop the
columns. I also had to lock in the selection of all KPI_TYPE values so that the
user wouldn’t accidentally&amp;nbsp;make selections on KPI_TYPE. If the expressions were
not using functions like &lt;i&gt;Above &lt;/i&gt;then allowing the user to make selections on
KPI_TYPE would make the chart more flexible.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Note that some
of the KPI_TYPE values can be labels and the corresponding row in the
expression is just a blank line. (Make sure the chart properties are not going
to hide a row of all blanks.)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;As Aaron mentions in a comment below, something similar can be achieved with a synthetic dimension using &lt;i&gt;ValueList&lt;/i&gt;. I think ValueList is better suited to a small number of values but it offers the advantage that a user can&#39;t accidentally select one of the values by clicking on the chart; a downside is that it may consume more resources (versus an actual field dimension) when used with a large data model.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background: #e0e0e0; color: #333333; font-family: &amp;quot;ms gothic&amp;quot;;&quot;&gt;★★★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1618022692456161898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/1618022692456161898' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1618022692456161898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1618022692456161898'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2016/12/straight-table-with-different.html' title='Straight Table with Different Expressions on Each Row'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUwVaGFgiQ5fxAE8R6hHnj4xE2oIblYsTrMLtnB5jtg-apAqQLV0jD_HBBEARQqEnMpQPFeaTAYdBtZfFluGXziCYaCeigFH5SBSalCy37tI8E-QEgLg_it6kuLsSPNSO2qSKeSn9Z2bme/s72-c/beachsunrise.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6629469608489877963</id><published>2016-12-04T12:13:00.001-05:00</published><updated>2016-12-04T12:13:09.790-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><title type='text'>Calendar Table and Preceding Load</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFympBHhvVkq_km_jekIb_eWNLgXDqmTX_vyjuDdSixuL_qTu_bKUeUPEFiV6xw5bPbFfwFj5uKUOvwy38r7N1V2_bcINkmzf9SVPt74aqCqYSNKzm4PF0Zg2Z_vfWnf95_bpqjoGpH3t/s1600/maplewood_flowers.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFympBHhvVkq_km_jekIb_eWNLgXDqmTX_vyjuDdSixuL_qTu_bKUeUPEFiV6xw5bPbFfwFj5uKUOvwy38r7N1V2_bcINkmzf9SVPt74aqCqYSNKzm4PF0Zg2Z_vfWnf95_bpqjoGpH3t/s320/maplewood_flowers.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here’s an example of a calendar table built with a series of &lt;i&gt;preceding load&lt;/i&gt; statements. The preceding load technique isn’t essential – this calendar table could have been built with a set of resident tables – but it is a good illustration of preceding load where each level of the load is a major revision of the level below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This example code comes from a loadscript where the earlier part of the script has already loaded 50 million rows of transaction data. This calendar table part runs in a few seconds. The client for this example uses a July through June fiscal year and I left in the calculations for fiscal month, fiscal quarter and fiscal year (they use a label like FY15/16 for fiscal year).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Remember to read the comments starting at the bottom since that is how the preceding load logic works. Note the &lt;i&gt;Dual &lt;/i&gt;function used to make sure the fiscal months sort properly from July to June in charts.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//Calendar table is for all Monday WeekStart dates for the transaction data &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;TBL_CALENDAR:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;LOAD&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;FDATE,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Month(FDATE) as CAL_MO,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Year(FDATE) as CAL_YEAR,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;dual(Month(FDATE),if(num(Month(FDATE))&amp;gt;6,num(Month(FDATE))-6,num(Month(FDATE))+6)) &amp;nbsp;AS FISCAL_MO,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;dual(&#39;FY&#39; &amp;amp; if(num(Month(FDATE))&amp;gt;6, &amp;nbsp; right(Year(FDATE),2)&amp;amp;&#39;/&#39;&amp;amp;right(Year(FDATE)+1,2), right(Year(FDATE)-1,2)&amp;amp;&#39;/&#39;&amp;amp;right(Year(FDATE),2)),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;if(num(Month(FDATE))&amp;gt;6, right(Year(FDATE),2),right(Year(FDATE)-1,2))) as FISCAL_YR,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Pick(Month(FDATE),&#39;Q1&#39;,&#39;Q1&#39;,&#39;Q1&#39;, &#39;Q2&#39;,&#39;Q2&#39;,&#39;Q2&#39;, &#39;Q3&#39;,&#39;Q3&#39;,&#39;Q3&#39;, &#39;Q4&#39;,&#39;Q4&#39;,&#39;Q4&#39;) as QTR,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Pick(Month(FDATE),&#39;Q3&#39;,&#39;Q3&#39;,&#39;Q3&#39;, &#39;Q4&#39;,&#39;Q4&#39;,&#39;Q4&#39;, &#39;Q1&#39;,&#39;Q1&#39;,&#39;Q1&#39;, &#39;Q2&#39;,&#39;Q2&#39;,&#39;Q2&#39;) as FISCAL_QTR;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//now, make a complete set of FDATEs between min and max&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//without missing any weeks. Autogenerate keyword not needed &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Load&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Date(MINFDATE+(IterNo()*7)) as FDATE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;While MINFDATE+(IterNo()*7) &amp;lt;= MAXFDATE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//get the minimum (oldest) FDATE and maximum (newest) FDATE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Load&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Weekstart(Min(FDATE)) as MINFDATE,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Weekstart(Max(FDATE)) as MAXFDATE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;//First, get all of the distinct FDATE values that have been loaded&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Load date(FieldValue(&#39;FDATE&#39;, RecNo())) as FDATE&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;AutoGenerate FieldValueCount(&#39;FDATE&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I didn’t use it here but a WHERE clause will work with preceding load (WHERE EXISTS… is often useful) The ORDER BY clause seems to cause an error with proceding load but you can use logic like this example where the FDATE values are built and loaded in ascending order.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
★★★&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6629469608489877963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/6629469608489877963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6629469608489877963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6629469608489877963'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2016/12/calendar-table-and-preceding-load.html' title='Calendar Table and Preceding Load'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFympBHhvVkq_km_jekIb_eWNLgXDqmTX_vyjuDdSixuL_qTu_bKUeUPEFiV6xw5bPbFfwFj5uKUOvwy38r7N1V2_bcINkmzf9SVPt74aqCqYSNKzm4PF0Zg2Z_vfWnf95_bpqjoGpH3t/s72-c/maplewood_flowers.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4765655339634070614</id><published>2016-11-18T13:29:00.000-05:00</published><updated>2016-11-21T10:09:35.670-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>MonthsBetween Function</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGkvIxZcbQAp4xmKJfOL-MdljY27GxTf1EZfqQjUn3iRog4I34DNZrAl0DGJSe7DrBPoasHbDhJRZIPJsY6p2GVmZibiMvUH-92DiS-ZAiZ0fzvC-mw4U0slQBCKLyePSgVYUWQX1osaz/s1600/autumn_decor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGkvIxZcbQAp4xmKJfOL-MdljY27GxTf1EZfqQjUn3iRog4I34DNZrAl0DGJSe7DrBPoasHbDhJRZIPJsY6p2GVmZibiMvUH-92DiS-ZAiZ0fzvC-mw4U0slQBCKLyePSgVYUWQX1osaz/s320/autumn_decor.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;A few days ago I needed a calculation in a loadscript that would provide the number of months between two dates. This kind of calculation comes up sometimes with supply chain planning data when the difference between the month a sales forecast is developed and the month that the sales forecast is meant to be applied, sometimes called a &lt;i&gt;monthly lag&lt;/i&gt;, can be used to help measure forecast accuracy. QlikView provides a number of date functions but not one that can calculate the number of months between two dates.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I decided to make my own MonthsBetween date function using a document variable with input arguments. A variable like that can be used like a user defined function. I created a variable in the QlikView document and named it &lt;i&gt;MonthsBetween&lt;/i&gt;. This is what I typed for the content of the variable (you, of course, can copy and paste from this blog post):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: courier new, courier, monospace; font-size: x-small;&quot;&gt;((Year($2)*12 + Month($2)) - (Year($1)*12 + Month($1)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The $1 and $2 get replaced by two input arguments (which some people might call parameters) when the variable is used. The arguments must be dates. My loadscript (I was loading data from an Oracle database table) looked something like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;BUDGET_HIST:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;Load BUSINESS_UNIT,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;BUDGET_AMOUNT,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;CREATE_DATE,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;APPLY_DATE,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;$(MonthsBetween(CREATE_DATE, APPLY_DATE)) AS MONTH_LAG;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;Select * from BUDGET_HIST_TABLE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;For example, if the CREATE_DATE is 1-APRIL-2016 and the APPLY_DATE is 1-JULY-2016 then MONTH_LAG is 3. If the second date is later than the first date then the result will be a positive integer number of months. If the two dates are from the same month then the result is a zero. For my data, the APPLY_DATE is always later than or equal to the CREATE_DATE so MONTH_LAG is always 0 or greater. If CREATE_DATE was later than APPLY_DATE then MONTH_LAG would be a negative number.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The calculation is nothing special -- it must have been re-created thousands of times. But, putting it into a variable makes the calculation easy to use in many places and easy to share. Test it out in a &lt;u&gt;chart expression&lt;/u&gt; or &lt;u&gt;advanced search expression&lt;/u&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;When a variable contains expression code like that and the variable might be used as part of a larger expression in a chart, then it is a good idea to enclose the entire variable contents within parentheses as I did above. It helps prevent QlikView from processing the operators in the larger expression in the wrong order.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #e0e0e0; color: #333333; font-family: &amp;quot;ms gothic&amp;quot;; font-size: 13px;&quot;&gt;★★★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4765655339634070614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/4765655339634070614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4765655339634070614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4765655339634070614'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2016/11/monthsbetween-function.html' title='MonthsBetween Function'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGkvIxZcbQAp4xmKJfOL-MdljY27GxTf1EZfqQjUn3iRog4I34DNZrAl0DGJSe7DrBPoasHbDhJRZIPJsY6p2GVmZibiMvUH-92DiS-ZAiZ0fzvC-mw4U0slQBCKLyePSgVYUWQX1osaz/s72-c/autumn_decor.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5747752433097770200</id><published>2016-08-31T16:24:00.000-04:00</published><updated>2016-08-31T16:34:21.146-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><title type='text'>Is My KPI Getting Worse or Getting Better</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSS3x6OJ8LdpsB_x0489C86J4sFCQmDeCDOYTKyBNZQsjZImRUPI6QD1hO6zmw-YPGCf-b_wlXod0n0nlRlrcUSU-GD1Z9OK-5yERJa-9JeJSTx4euSUTp92Au9J0WWvMW-f7JZXxPH9T/s1600/cat_tail.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSS3x6OJ8LdpsB_x0489C86J4sFCQmDeCDOYTKyBNZQsjZImRUPI6QD1hO6zmw-YPGCf-b_wlXod0n0nlRlrcUSU-GD1Z9OK-5yERJa-9JeJSTx4euSUTp92Au9J0WWvMW-f7JZXxPH9T/s320/cat_tail.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;We have a lot of QlikView documents that measure various kinds of business planning performance. The measures are usually a calculation of the difference between planned values and the actual values. Then the calculation is normalized by dividing it either by the planned or actual values so that the measure can be shown on a document as a percentage.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Key measures or key performance indicators (KPI) like that, if they are well chosen and well designed, give people an idea of how well a business process is performing. I believe that the measure can be even more useful if we add to it an indication of whether the measure has been getting “better” or getting “worse” over time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Most of the performance measures we use are aggregation calculations that can be used with various dimensions like customer, product, or geographic region. When you show a measure like that in a line graph where the x-axis is time (for example, weeks or months) the line is usually jagged with up and down measures and maybe a “hump” or two.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The first thing you can do to help someone figure out if the measure is getting better or worse is to use a &lt;i&gt;trendline&lt;/i&gt;. In a line graph, go to the chart properties and pick the expression where you’d like to see the trend, find the &lt;i&gt;trendlines&lt;/i&gt; section of the expression dialog and click the &lt;i&gt;Linear&lt;/i&gt; check box. Now, click OK and you should see that QlikView has drawn a straight line across your jagged line graph. The upward or downward slope of the line can give a person some idea of whether the measure has been getting better or worse.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Note: I usually modify the Presentation tab of the chart properties and set Trendline Width to a narrow line (maybe 0.5) so it doesn’t compete with the main graph line for attention.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;If you stop reading this post at this point, then you’ve already picked up something useful.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Some users of these documents say that they would like the document to point out the areas where a particular measure is getting very bad so they know where to spend their time or resources. We can use a function already built in to QlikView to provide us with a number that would, if it was a trendline in a graph, be the slope of the line.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;If the line is going uphill from left to right, then that would be a positive slope and if it is going downhill then that would be a negative slope. A flat, level line would have a slope of zero. I’m going to describe here how to build a calculated dimension for a chart that can show the 20% of things where a measure has been deteriorating the worst over time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;First, to simplify the description, imagine that you have taken the performance measure expression from your straight table and put it into a variable. We’ll call the variable &lt;i&gt;vKPI&lt;/i&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The time dimension field in the example is PWEEK.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;And we are going to use this calculated dimension in a straight table where it will be labeled &lt;i&gt;20% of Projects Where KPI Has Deteriorated the Most&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The &lt;i&gt;linest&lt;/i&gt; function is used to calculate the slope of the imaginary graph line.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The &lt;i&gt;Rank&lt;/i&gt; function will help identify the 20% of worst performing PROJECTs.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Aggr&lt;/i&gt; is used to create an array of PROJECT values for our chart dimension. In this example, the higher values indicate a deteriorating measure but you can flip the calculation around if your logic is reversed.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;=aggr(if((Rank(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; linest_m(&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; aggr(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; =$(vKPI)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; ,[PROJECT],PWEEK)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;,PWEEK)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;,1)-1) / Count(distinct total [PROJECT]) &amp;lt; 0.20, [PROJECT]), [PROJECT])&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;I know this is one of the more complex topics I’ve tackled in this blog but the result in a document that analyzes key performance indicators is valuable. In the documents where I’ve used this concept I usually provide a method for the user to choose what dimension field they would like to use, so it is not limited to PROJECT so the user could choose PRODUCT, SALESPERSON, or REGION, etc. And then for even more flexibility, I put the calculated dimension into a cycle group made up of other calculated dimensions that identify things that need attention.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In my next post, I’ll show how a related calculation could be used to color code items in a chart so that the items where performance has been getting worse are tagged with red and items where performance has been getting better are tagged with green.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;ms gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★★★&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5747752433097770200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/5747752433097770200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5747752433097770200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5747752433097770200'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2016/08/is-my-kpi-getting-worse-or-getting.html' title='Is My KPI Getting Worse or Getting Better'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSS3x6OJ8LdpsB_x0489C86J4sFCQmDeCDOYTKyBNZQsjZImRUPI6QD1hO6zmw-YPGCf-b_wlXod0n0nlRlrcUSU-GD1Z9OK-5yERJa-9JeJSTx4euSUTp92Au9J0WWvMW-f7JZXxPH9T/s72-c/cat_tail.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4184978780490583741</id><published>2015-12-24T13:52:00.004-05:00</published><updated>2015-12-30T10:44:24.889-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="field names"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="set analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><title type='text'>Chart Adjusts to Whatever Fieldnames are Loaded</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMEOkgWxoGehGA0-ZLVfgdENFhfkq1JpvG-eTovGVXazzQ-Eql32RJO0MX_QL0qgnXgiLLGyRtIQGiTkUDX1TNtf35MAqvnpt8ndTaMuAfQbR-8IgqZfBxbWqx2Dwk8La2h8Q7ozmwuiT3/s1600/20151219TB_3530_small.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMEOkgWxoGehGA0-ZLVfgdENFhfkq1JpvG-eTovGVXazzQ-Eql32RJO0MX_QL0qgnXgiLLGyRtIQGiTkUDX1TNtf35MAqvnpt8ndTaMuAfQbR-8IgqZfBxbWqx2Dwk8La2h8Q7ozmwuiT3/s1600/20151219TB_3530_small.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I’m often called on to validate a new data file from a client or to examine a new data extract. My first step is to load data into a copy of Steve Dark’s &lt;i&gt;Data Profiler&lt;/i&gt; (search on &lt;i&gt;quickintelligence data profiler&lt;/i&gt;). I’ve made a few modifications to Steve’s original document – here are a couple of the most useful.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I added a line to the loadscript that uses preceding load to add a record number to the rows being loaded. My line is added between the table label and the first line of the regular Load statement. It looks like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DATAFILE: &amp;nbsp;//table label&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load *, recno() as zrecno; &amp;nbsp;//this is the preceding load line&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load &amp;nbsp; //this is the beginning of your &quot;regular&quot; Load statement&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For the second set of modifications, I added a new sheet or tab which I named &lt;i&gt;Table&lt;/i&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;On the new tab, I added a multibox and then I added, not fieldnames, but 20 expressions. You can add any number you like but 20 seemed like plenty. These are mostly copy and paste so they are not a lot of typing and you can start by copying the expression shown in this blog and pasting it into your document. The first multibox expression looks like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[$(=only({1&amp;lt;$FieldNo={1}&amp;gt;} $Field))]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That expression evaluates to the fieldname corresponding to field #1. Then I add a second expression to the multibox:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[$(=only({1&amp;lt;$FieldNo={2}&amp;gt;} $Field))]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can see that in the second expression, I changed $FieldNo={1} to $FieldNo={2} so that the second expression evaluates to the fieldname corresponding to field #2. I did that for each of the 20 expressions so that the 20th expression in the multibox contains $FieldNo={20}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Then, I added a straight table chart. I used &lt;b&gt;zrecno&lt;/b&gt; as the dimension. Then, I added 20 expressions. For the first expression, I typed this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[$(=only({1&amp;lt;$FieldNo={1}&amp;gt;} $Field))]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;And for the label, I typed this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$(=only({1&amp;lt;$FieldNo={1}&amp;gt;} [$Field]))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Again, the rest of the expressions are similar, each time changing the $FieldNo={1} to be 2 for the second expression and its label, $FieldNo={3} for the third expression and its label and so on for each of the 20 expressions. Click OK when you’re done.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now, you have a multibox and a straight table chart that appear as though you typed in the 20 fieldnames. But, these objects will adjust themselves to whatever fieldnames are loaded. If you load a file with less than 20 fieldnames, the “extra” ones will just be null.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can copy and paste these objects into other QlikView documents and they will adjust themselves to whatever the first 20 fieldnames are in the document (see important info in first blog comment below). But, I think these are most useful in a document where different fieldnames can be loaded each time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I checked Dropdown Select for all columns in the Presentation tab to make it easier for the document user to make selections on the chart.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In order that we don’t burn up all of the memory on the computer, I added a calculation condition to the straight table chart with this expression =if(count(zrecno) &amp;lt; 200000,1,0) so that the chart will refuse to appear if there are more than 200,000 rows. I customized the error message for the calculation condition to say, “&lt;i&gt;There’s more than 200k rows. You have to make some selections to reduce the amount of data in this chart.&lt;/i&gt;” A calculation condition like this is a good idea whenever you have an object that might try to show more data than is possible with the available memory.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; ★★★&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4184978780490583741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/4184978780490583741' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4184978780490583741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4184978780490583741'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/12/chart-adjusts-to-whatever-fieldnames.html' title='Chart Adjusts to Whatever Fieldnames are Loaded'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMEOkgWxoGehGA0-ZLVfgdENFhfkq1JpvG-eTovGVXazzQ-Eql32RJO0MX_QL0qgnXgiLLGyRtIQGiTkUDX1TNtf35MAqvnpt8ndTaMuAfQbR-8IgqZfBxbWqx2Dwk8La2h8Q7ozmwuiT3/s72-c/20151219TB_3530_small.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4700485393864557788</id><published>2015-12-01T16:20:00.000-05:00</published><updated>2015-12-01T16:20:01.374-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alternate states"/><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="set analysis"/><title type='text'>Easy to Add Multivariate Analysis Feature</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif2AYvdOuv5soy4LEmyXoxT3PCZlixJZ1VstqqZvwYLpOyE-73qv0OJXOAEuGXxtQ_HEgC63AJYkhm_RwsaLBfHh4XYr9W3bs0RW_5-vBoKk727qq5HGVR2kWrhkzKg5YHAwOd1EnpEpxb/s1600/cloudy_shapes.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif2AYvdOuv5soy4LEmyXoxT3PCZlixJZ1VstqqZvwYLpOyE-73qv0OJXOAEuGXxtQ_HEgC63AJYkhm_RwsaLBfHh4XYr9W3bs0RW_5-vBoKk727qq5HGVR2kWrhkzKg5YHAwOd1EnpEpxb/s320/cloudy_shapes.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;Here is a
technique that I’ve used several times over the past year to quickly add a
multivariate analysis feature to a document. We have numerous documents that have a multibox for selections and usually a graph and at least
one chart; usually a straight table with a cycle group for the dimension. I usually
start with one of these existing documents.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;This feature
uses QlikView alternate states. I normally steer people away from using alternate states
in documents used by business users as it can be confusing. But, in this
technique, it seems to be easily used and understood.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;The first step,
is to add an alternate state to the document. Using the menu, choose &lt;b&gt;Settings-&amp;gt;Document
Properties&lt;/b&gt;, then choose the &lt;b&gt;General&lt;/b&gt; tab and click the &lt;b&gt;Alternate States…&lt;/b&gt; button
(if you don’t see the button then you may be using an older version that doesn’t
have the Alternate States functionality). On the Alternate States dialog box
that appears, click &lt;b&gt;Add &lt;/b&gt;and then simply type a&amp;nbsp;
&lt;b&gt;B&lt;/b&gt;&amp;nbsp; and then click &lt;b&gt;OK&lt;/b&gt;. This defines
an alternate state in the document named B. It’s not a very descriptive name
but it is perfect for this technique.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;Now, we’re
going to duplicate the multibox. Right-click on the multibox and choose &lt;b&gt;Copy to
Clipboard -&amp;gt; Object&lt;/b&gt;. Then, from the menu choose &lt;b&gt;Edit-&amp;gt;Paste&lt;/b&gt;. QlikView
will paste the new copy right on top of the old one so you need to drag the
copy of the multibox off to the right. This is easiest if the multibox
properties Show Caption option is checked so you can click on the title bar at
the top of the multibox and drag it. Make the caption of the original multibox say
&lt;b&gt;Selections:&lt;/b&gt;&amp;nbsp;&amp;nbsp; and make the caption on the
new copy of the multibox say&amp;nbsp; &lt;b&gt;&lt;i&gt;B
Selections:&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp; It may help to make the
caption font on the new copy in italics.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;Easy, so far? Now,
right-click on the new copy multibox and choose &lt;b&gt;Properties&lt;/b&gt;. Choose the &lt;b&gt;General
&lt;/b&gt;tab and look for the &lt;b&gt;Alternate State&lt;/b&gt; field at the top. Click the little down
arrow on the Alternate State box and click to choose &lt;b&gt;B&lt;/b&gt; and then click &lt;b&gt;OK&lt;/b&gt;. You
now have two multiboxes: one that controls the usual selections and one that
controls an entirely different set of selections in alternate state B.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;Here&#39;s the
part that makes it useful. In your charts, you probably have a column something
like this:&amp;nbsp;&amp;nbsp; Sum( Sales )&amp;nbsp; with the label &lt;i&gt;Sales&lt;/i&gt; on it. Add a new column,
label it &lt;i&gt;Sales B&lt;/i&gt;, and put it right next to the original column. For the
expression, type&amp;nbsp; Sum({B} Sales)&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;The syntax is
the same as for set analysis. But, this is simpler, just use the {B} inside the
argument for any aggregation function and it makes the aggregation use the
selections that are defined in your &lt;i&gt;B Selections&lt;/i&gt; multibox. No need to change
the chart dimensions or change anything in the load script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;Now, you can
compare the column for &lt;i&gt;Sales&lt;/i&gt; with the &lt;i&gt;Sales B &lt;/i&gt;column with the numbers side by
side. I assume the fields most useful for the data were already defined in the
multibox. So, you can change the B selections to easily compare, for example, June
sales next to March sales; or compare tier 1 customers versus tier 2 customers;
or profit from the 1kg size versus the 500g size, or inventory turns at the
Memphis warehouse versus turns at the combined California warehouses or total
cost of the cheesy-beans business versus costs with administrative costs
unselected,… etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;As quickly as
you can add a new field to the two multiboxes, you can have a side by side comparison
of data for different selections on that field.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;I’ve found that
graphs that use this technique should use a similar but noticeably different
appearance for the two expressions. Using the example from above, a graph of
Sales could use a red line in the line graph and use a dotted red line for
Sales B.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;You can use
color in the chart to point out the biggest differences between the regular
aggregation and the B aggregation. I’ve sometimes used the Colormix wizard to color the
rows with the biggest differences in bright yellow and the smaller differences
with less bright shades of yellow (the Colormix wizard is described in the
manual and it is well worth your time to become familiar with it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;It would be
just as easy to also add C Selections but, so far, I haven’t found a case where
it adds value. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★★★&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4700485393864557788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/4700485393864557788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4700485393864557788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4700485393864557788'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/12/easy-to-add-multivariate-analysis.html' title='Easy to Add Multivariate Analysis Feature'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif2AYvdOuv5soy4LEmyXoxT3PCZlixJZ1VstqqZvwYLpOyE-73qv0OJXOAEuGXxtQ_HEgC63AJYkhm_RwsaLBfHh4XYr9W3bs0RW_5-vBoKk727qq5HGVR2kWrhkzKg5YHAwOd1EnpEpxb/s72-c/cloudy_shapes.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3650499826008516425</id><published>2015-03-07T11:43:00.000-05:00</published><updated>2015-03-07T11:47:08.132-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="qvw"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>How Many Days Since That Document Reloaded?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisB0Dn2VPMCKagDAhyy4pGQyGs-tN431yJuyUY2hfUAsvn9SyEjiNNitYPP1JPU_cGwiV7UkOY8GOHx9r4AtCTKiR9NIoN-lER5zU5XSXisDJgogEJozwiWJOLMHO85kaUl5Vv2LM1bX8r/s1600/20150306TB_1698_small.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisB0Dn2VPMCKagDAhyy4pGQyGs-tN431yJuyUY2hfUAsvn9SyEjiNNitYPP1JPU_cGwiV7UkOY8GOHx9r4AtCTKiR9NIoN-lER5zU5XSXisDJgogEJozwiWJOLMHO85kaUl5Vv2LM1bX8r/s1600/20150306TB_1698_small.jpg&quot; height=&quot;320&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;I was
challenged to write a simple blog posting. Here it is, although it still has
some code in it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;A recent
project required a document to “know” how many days ago a separate .qvw document
had been reloaded. This statement in the loadscript uses the pathname to the separate document and puts the answer to “how many
days ago” in the variable &lt;i&gt;vDaysAgo&lt;/i&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;LET&amp;nbsp;vDaysAgo&amp;nbsp;=
Now() -&amp;nbsp;FileTime(&#39;e:\ventures\PriceAnalysis.qvw&#39;);&amp;nbsp;&lt;/span&gt;&lt;u style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★★★&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3650499826008516425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/3650499826008516425' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3650499826008516425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3650499826008516425'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/03/i-waschallenged-to-write-simple-blog.html' title='How Many Days Since That Document Reloaded?'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisB0Dn2VPMCKagDAhyy4pGQyGs-tN431yJuyUY2hfUAsvn9SyEjiNNitYPP1JPU_cGwiV7UkOY8GOHx9r4AtCTKiR9NIoN-lER5zU5XSXisDJgogEJozwiWJOLMHO85kaUl5Vv2LM1bX8r/s72-c/20150306TB_1698_small.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1134038243817588045</id><published>2015-01-31T17:36:00.000-05:00</published><updated>2015-02-01T10:33:21.493-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="field names"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="toolkit"/><title type='text'>General File Loading Technique</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eIMTgZ4cfvrVu1LuN8ldEDyui5uDCCNe5kxXnOslIJUBfhUCMHf9fdOF2DPZ350N1EEieoJyuaAN5iwQBSkpXZver_JnP_fhyphenhypheneDwjDd4OtgGIcjXc2OQxv9po1lFrR0wnHJG_G1jYooQ/s1600/20140811TB_0706_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eIMTgZ4cfvrVu1LuN8ldEDyui5uDCCNe5kxXnOslIJUBfhUCMHf9fdOF2DPZ350N1EEieoJyuaAN5iwQBSkpXZver_JnP_fhyphenhypheneDwjDd4OtgGIcjXc2OQxv9po1lFrR0wnHJG_G1jYooQ/s1600/20140811TB_0706_blogsmall.jpg&quot; height=&quot;213&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here’s a technique I first used several years ago when I started a project where we had several dozen data files, all of them containing different data, in a delimited format and each of them with a header record as the first record containing the field names. The loadscript code below shows how we could load each of the files into different QlikView tables using the same loadscript.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The code below has the filename in the code but it could be loaded into the QlikView document by including the filename as a variable in the command line execution of QlikView&amp;nbsp;(for an example, search on &quot;qlikview maven command line and automation&quot;)&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. &amp;nbsp;Other options include building a loop and loading each of files in a folder (search on “qlikview maven loading all of the files from a folder”); or, if you are comfortable with macro module code, you could use a browse-for-file technique to make it easy to find and load a filename (search on “qlikview maven browse-for-file macro button”).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here’s the loadscript example code: &amp;nbsp;(some of the long lines are wrapped around as you view the code in the blog window but they will go back to normal if you copy and paste the code into a text file or loadscript edit window)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Set xfile=&#39;customer_data_12.csv&#39;; //file pathname&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Let xfile=Upper(&#39;$(xfile)&#39;); //optional convert to upper case&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FIELDDAY: &amp;nbsp;//load first record only&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load * from $(xfile)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(txt, no labels, delimiter is &#39;|&#39;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;where recno()=1; &amp;nbsp;//note &quot;no labels&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Set loadstatement=&#39;Load &#39;; //now, build the Load statement&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;For i=1 to 100&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Let fn=trim(SubField(peek(&#39;@$(i)&#39;,0,&#39;FIELDDAY&#39;),&#39;;&#39;,1));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if &#39;$(fn)&#39;=&#39;&#39; then&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; exit for&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; end if;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if $(i)=1 then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Let loadstatement=&#39;$(loadstatement) @$(i) as [$(fn)]&#39;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Let loadstatement=&#39;$(loadstatement), @$(i) as [$(fn)]&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; end if&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Next&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$(xfile): //QlikView table name&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$(loadstatement)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FROM&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$(xfile)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(txt, no labels, header is 1 line, delimiter is &#39;|&#39;); //change delimiter character as needed&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Drop table FIELDDAY;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Store $(xfile) into $(xfile).qvd (qvd); //optional save as qvd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;//Drop table $(xfile); &amp;nbsp;//optional drop table&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Change the file attributes as needed for your situation: for example, Excel files, skip over unneeded header records, different delimiter, etc.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;There are two important ideas illustrated in the example: &amp;nbsp;first, the idea of loading the header record of a file and building a custom load statement on the spot; second, the idea that you can construct &lt;i&gt;any&lt;/i&gt; loadscript statement or part of a statement in a variable and execute it just by putting the variable in the right place in the loadscript.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This technique helped me in a recent project where the data files were supplied with field names in the header record but all of the field names needed a little modification in order to use them. Some of them I converted to upper case and some of them needed to have special characters removed. It was easy to add the necessary text functions to edit the field names as the code assembled the load statement.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;It will help you debug and validate this technique if you set the document properties option to write out a loadscript log file when the loadscript runs. The log file will show all of the lines in the loadscript as they were executed with variables fully expanded.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&amp;nbsp; ★★★&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1134038243817588045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/1134038243817588045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1134038243817588045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1134038243817588045'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/01/general-file-loading-technique.html' title='General File Loading Technique'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eIMTgZ4cfvrVu1LuN8ldEDyui5uDCCNe5kxXnOslIJUBfhUCMHf9fdOF2DPZ350N1EEieoJyuaAN5iwQBSkpXZver_JnP_fhyphenhypheneDwjDd4OtgGIcjXc2OQxv9po1lFrR0wnHJG_G1jYooQ/s72-c/20140811TB_0706_blogsmall.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6857863942945514027</id><published>2015-01-11T16:04:00.000-05:00</published><updated>2015-01-12T16:13:38.055-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="optimized load"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="qvd"/><title type='text'>A Little More Optimized Load</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXlE4wclGwGaYSjceA9TOkZVhvXehBDCUP-tHG7gXXhor1X3QaLgjzB5CPQ57432pdxjFo1-mY1h52nUrTH8I78vfBS-PLhP0plTFxRx1oQfDWaKOt-dhPggI5_cYv_2r_EPhyphenhyphenK10I3zc/s1600/20140811TB_0824_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXlE4wclGwGaYSjceA9TOkZVhvXehBDCUP-tHG7gXXhor1X3QaLgjzB5CPQ57432pdxjFo1-mY1h52nUrTH8I78vfBS-PLhP0plTFxRx1oQfDWaKOt-dhPggI5_cYv_2r_EPhyphenhyphenK10I3zc/s1600/20140811TB_0824_blogsmall.jpg&quot; height=&quot;203&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This is a continuation of last week’s blog topic (search on &quot;&lt;i&gt;QlikView Maven Optimized QVD Load With a Where Clause and Dates&lt;/i&gt;&quot;).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I had a load statement in a loadscript loading from a qvd file that (simplifying a bit) looked like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_DATA: &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load CUST_NO,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ApplyMap(&#39;custprimap&#39;,CUST_NO) as CUST_PRIORITY,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_NO,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_AMT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;from invoice_data.qvd (qvd)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;where exists(INV_DATE);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;It was written using a mapping table feature for customer data to avoid a left join load for performance reasons. But, the load from the qvd file wasn’t an optimized load because of the &lt;i&gt;ApplyMap&lt;/i&gt; function. The table contained many millions of rows and using an optimized load would save quite a bit of time.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I was able to get an optimized load and still have the ApplyMap functionality by recoding that portion of the loadscript to also use a &lt;i&gt;Join &lt;/i&gt;and a super-fast load from &lt;i&gt;FieldValue&lt;/i&gt; like this:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_DATA: &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load CUST_NO, //optimized load&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_NO,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_AMT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;from invoice_data.qvd (qvd)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;where exists(INV_DATE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Join (INVOICE_DATA) load //preceding load&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CUST_NO,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ApplyMap(&#39;custprimap&#39;,CUST_NO) as CUST_PRIORITY;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load FieldValue(CUST_NO,IterNo()) as CUST_NO&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Autogenerate(1) while not isnull(FieldValue(CUST_NO,IterNo()));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;______________ _________________ ________________&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Note to Santhosh: &amp;nbsp;You can add special comments to a chart expression that will make it easier to find specific expressions with the &lt;i&gt;Settings-&amp;gt;Expression Overview, Find&lt;/i&gt; feature. For example, you might use an expression like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sum(CONTRCT_S1 * CNTRY_ADJ) //per NATO procurement 1987.36.c&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;and then it would be easier to find the expressions that need to be changed when procurement rules change by doing an Expression Overview &lt;i&gt;Find&lt;/i&gt; on &quot;NATO procurement&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Our otherwise well-intentioned friends who believe all chart expressions should be contained within variables cannot easily use this suggestion.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; ★★★</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6857863942945514027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/6857863942945514027' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6857863942945514027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6857863942945514027'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/01/a-little-more-optimized-load.html' title='A Little More Optimized Load'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXlE4wclGwGaYSjceA9TOkZVhvXehBDCUP-tHG7gXXhor1X3QaLgjzB5CPQ57432pdxjFo1-mY1h52nUrTH8I78vfBS-PLhP0plTFxRx1oQfDWaKOt-dhPggI5_cYv_2r_EPhyphenhyphenK10I3zc/s72-c/20140811TB_0824_blogsmall.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-502121958876741391</id><published>2015-01-07T22:37:00.000-05:00</published><updated>2015-01-11T16:05:17.867-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="optimized load"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="qvd"/><title type='text'>Optimized QVD Load With a Where Clause and Dates</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizFaoY6EV6PShGb_J7IKYkERx0842qr5KvnfWfT4S0CtnJ38qeu5gr9cvv7H2xYbQIjrtqqMIIc_6YBDUH7XzEtT2l8FGeat3j9F6JYNVYGa_7JBvRj3U7q2rXxi79uROodEdei4FogN3Q/s1600/20130907TB_8816_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizFaoY6EV6PShGb_J7IKYkERx0842qr5KvnfWfT4S0CtnJ38qeu5gr9cvv7H2xYbQIjrtqqMIIc_6YBDUH7XzEtT2l8FGeat3j9F6JYNVYGa_7JBvRj3U7q2rXxi79uROodEdei4FogN3Q/s1600/20130907TB_8816_blogsmall.jpg&quot; height=&quot;213&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you are working with large quantities of data and especially if you are working with large data sets of historical data where you add a portion of new data to the historical data each week (an &lt;i&gt;incremental load&lt;/i&gt;), then you will want to be working with qvd files in your loadscript. And if you are working with qvd files then you certainly want to load data from the qvd files with an &lt;i&gt;optimized load&lt;/i&gt;. The optimized load is many times faster than loading the same data with an unoptimized load.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;A common problem is that adding a &lt;i&gt;where clause&lt;/i&gt; to the load statement will cause the load to be unoptimized. Some types of where clauses though, can be used with an optimized load. A simple&amp;nbsp;&lt;i&gt;&lt;u&gt;where exists&lt;/u&gt;&lt;/i&gt; type of where clause, for example, can usually be used with an optimized load.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Every incremental load process is a little different but if your process involves dates then this idea may help. This idea is for situations where you want to load data from a qvd file and you want your where clause to refer to a date within the data. Here’s an example:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Imagine that you have a date like 01/01/2014 in a variable named &lt;i&gt;start_dt&lt;/i&gt; and another date like 12/31/2015 in a variable named &lt;i&gt;end_dt &lt;/i&gt;and you want to load invoice data where the invoice date, &lt;i&gt;inv_date&lt;/i&gt;, is between start_dt and end_dt. First, build a little table of all possible dates between start_dt and end_dt. Use this in the loadscript before loading any other data containing a INV_DATE field:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/* Build table of dates just for the &quot;where exists&quot; clause */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;TMP_DATE_TABLE:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load date(date(&#39;$(start_dt)&#39;)+IterNo()-1) as INV_DATE&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;AutoGenerate(1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;While date(date(&#39;$(start_dt)&#39;)+IterNo()-1) &amp;lt;= date(&#39;$(end_dt)&#39;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That code can build a large table of dates in your loadscript in just a few seconds. Now, you can code the load from qvd like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INVOICE_DATA: &amp;nbsp; //this is an optimized load&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load * from invoice_data.qvd (qvd)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;where exists(INV_DATE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Drop table TMP_DATE_TABLE; //no longer needed&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That table of dates can be varied as needed for your specific application. For example, using (IterNo()-1)*7 could give you a set of week start dates. Use whatever method makes sense to create a list of the dates that you would want to load if they exist within the qvd file data. Remember, the basic idea here is to build a table of values you would like to load from the qvd file. It is not limited to dates and not all of the values in your temp table have to actually match something in the qvd file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;____________ _________________ _________________&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Note to Santhosh: &amp;nbsp;If you need to quickly find the maximum or latest invoice date from the qvd file in order to use it with date arithmetic then you can get it in a variable by doing something like this in your loadscript before loading any other tables with the INV_DATE field:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;TMP_INV_DATE: &amp;nbsp;//this is an optimized load&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load INV_DATE FROM invoice_data.qvd (qvd);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;TMP_MAXINV_DATE:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load Max(INV_DATE) as maxinvdate; &amp;nbsp;//preceding load&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Load FieldValue(&#39;INV_DATE&#39;,IterNo()) as INV_DATE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;AutoGenerate(1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;While not Isnull(FieldValue(&#39;INV_DATE&#39;,IterNo()));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Let var_maxinvdate = Peek(&#39;maxinvdate&#39;,-1,&#39;TMP_MAXINV_DATE&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Drop tables TMP_INV_DATE, TMP_MAXINV_DATE; //not needed&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-language: AR-SA; mso-fareast-language: EN-US;&quot;&gt;★★★&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-language: AR-SA; mso-fareast-language: EN-US;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/502121958876741391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/502121958876741391' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/502121958876741391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/502121958876741391'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/01/optimized-qvd-load-with-where-clause.html' title='Optimized QVD Load With a Where Clause and Dates'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizFaoY6EV6PShGb_J7IKYkERx0842qr5KvnfWfT4S0CtnJ38qeu5gr9cvv7H2xYbQIjrtqqMIIc_6YBDUH7XzEtT2l8FGeat3j9F6JYNVYGa_7JBvRj3U7q2rXxi79uROodEdei4FogN3Q/s72-c/20130907TB_8816_blogsmall.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-55804031016485881</id><published>2015-01-02T20:26:00.001-05:00</published><updated>2015-01-04T10:54:46.103-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>Testing the Aggr Function Used in an Expression</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlgcWwpYBOVK6yCEbac4eZrjQHLvKDtcsE9t0nwlV8jduDKXft9E72pl6nywpBNar3TAYya_e63_1G1b9LPvfcUg2VWT2sJF6CDnmeAWgUpoGlzL0L7ksb39Ibc9r96ZWwXPtepS3S8S8c/s1600/20140811TB_0572_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlgcWwpYBOVK6yCEbac4eZrjQHLvKDtcsE9t0nwlV8jduDKXft9E72pl6nywpBNar3TAYya_e63_1G1b9LPvfcUg2VWT2sJF6CDnmeAWgUpoGlzL0L7ksb39Ibc9r96ZWwXPtepS3S8S8c/s1600/20140811TB_0572_blogsmall.jpg&quot; height=&quot;320&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I’m often asked to take a look at someone&#39;s QlikView document with the explanation that “the expression&amp;nbsp;doesn&#39;t&amp;nbsp;work”. If it is a complex expression with multiple parts or multiple functions I&amp;nbsp;suggest taking each part of the expression and testing it to make sure it is performing the expected function. When one of the parts is something simple like &amp;nbsp;&lt;i&gt;sum(InvoiceAmt)&lt;/i&gt; &amp;nbsp;then most people get the idea that they can put that little part of the expression into a temporary chart column or text box and then, based on the current selections and/or chart dimension, check that the function is really showing the sum of the invoice amounts.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If the part of the expression that needs to be tested is an &lt;i&gt;aggr&lt;/i&gt; function then you need to know how to check it because the &lt;i&gt;aggr&lt;/i&gt; function does not return a single value like the &lt;i&gt;sum&lt;/i&gt; function; it returns an array of one or more values. An array of multiple values will usually show up as a null in a chart expression or text expression. If the array happens to have only one value or if all of the values in the array are exactly the same then you will be able to see the result of the expression but its no guarantee that the function is working as intended.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In order to test the &lt;i&gt;aggr&lt;/i&gt; function itself, I recommend surrounding the &lt;i&gt;aggr &lt;/i&gt;function with a &lt;i&gt;concat&lt;/i&gt; expression that will help you analyze the array of the values returned by &lt;i&gt;aggr&lt;/i&gt;. For example, if you had a straight table chart with a dimension of geographic region, you might have an expression like this to calculate average sales rep invoice amount totals:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Avg( Aggr( sum(InvoiceAmt), SalesRep) )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In order to view the values returned by the &lt;i&gt;aggr &lt;/i&gt;function, you could create a temporary column and copy and paste the &lt;i&gt;aggr &lt;/i&gt;portion of the original expression and surround it with a &lt;i&gt;concat &lt;/i&gt;function that might look like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Concat( Aggr( sum(invoiceamt), SalesRep), &#39; / &#39; )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That would create a text string showing the individual values in the array separated or delimited by &#39; / &#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Another useful delimiter is &#39;, &#39; which creates a text string showing the individual values separated by commas.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;When using this technique with a chart column there might not be enough space to show all of the array values separated by the delimiter. If that happens, right-click on the chart cell you would like to examine and choose &lt;i&gt;Copy to Clipboard - Cell Value &lt;/i&gt;(in a text box you may right-click and choose &lt;i&gt;Copy to Clipboard - Text&lt;/i&gt;) and then paste the value into a text file or spreadsheet or other convenient place to review a long text string.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If the array of values you see using this method is what you expected then check out all of the other sections of your expression – if all of them are working as you expect then assembling them into a single expression should work in your application. I often recommend building and testing each of the parts as a development technique when building a complex expression.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;One other method for examining the array of values returned by the &lt;i&gt;aggr&lt;/i&gt; function is to use it in a temporary chart and use the &lt;i&gt;aggr&lt;/i&gt; function as a &lt;i&gt;calculated dimension&lt;/i&gt;. A calculated dimension is, by definition, an array of values and it may help you review the values.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;_______________ ___________________ ___________________&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Note to Santhosh: &amp;nbsp; You can remove leading zeros from a numeric identifier like a SAP 18-digit material number in the loadscript with a line like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;replace(ltrim(replace(MATNR,&#39;0&#39;,&#39; &#39;)),&#39; &#39;,&#39;0&#39;) as MATNR_NO_ZEROS,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you foresee the need to do a left join load using the original identifier then keep it as a separate field. If you would like to turn this into a &lt;i&gt;user-defined function&lt;/i&gt; like I wrote about three years ago (search on &quot;qlikview maven user-defined function&quot;) then do this:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create a variable named &lt;i&gt;DropZeros&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Paste this into the variable: &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;replace(ltrim(replace($1,&#39;0&#39;,&#39; &#39;)),&#39; &#39;,&#39;0&#39;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now, you have something that works like a user-defined function. It could be used in your loadscript line like this:&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;$(DropZeros(MATNR)) as MATNR_NO_ZEROS,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
★★★&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-language: AR-SA; mso-fareast-language: EN-US;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/55804031016485881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/55804031016485881' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/55804031016485881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/55804031016485881'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2015/01/testing-aggr-function-used-in-expression.html' title='Testing the Aggr Function Used in an Expression'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlgcWwpYBOVK6yCEbac4eZrjQHLvKDtcsE9t0nwlV8jduDKXft9E72pl6nywpBNar3TAYya_e63_1G1b9LPvfcUg2VWT2sJF6CDnmeAWgUpoGlzL0L7ksb39Ibc9r96ZWwXPtepS3S8S8c/s72-c/20140811TB_0572_blogsmall.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2822719165152113202</id><published>2014-12-04T20:30:00.000-05:00</published><updated>2014-12-07T09:10:07.486-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="selection"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><title type='text'>Function With Flexible, Choosable Dimensions</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_T8oYhmpk6N7hA0GIzP377XlsxzZYZphYaDtYYGbSzGuxEfupfiXCjroMN4_80BXYmGvmQ-kStT-XclX8frw5TWhHF19aj4emkMaTMFAnYoZ0ZIdF0PC01xeyjUidk1fZhYnDefbB2OWZ/s1600/20140117TB_9887_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_T8oYhmpk6N7hA0GIzP377XlsxzZYZphYaDtYYGbSzGuxEfupfiXCjroMN4_80BXYmGvmQ-kStT-XclX8frw5TWhHF19aj4emkMaTMFAnYoZ0ZIdF0PC01xeyjUidk1fZhYnDefbB2OWZ/s1600/20140117TB_9887_blogsmall.jpg&quot; height=&quot;320&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;I worked on a
document last week that calculated a performance indicator metric based on
budget amounts compared to actual spending amounts. The chart expression for the
calculation used the &lt;i&gt;Aggr&lt;/i&gt; function and two dimensions: spending program and
geographic region. Simplifying from the actual expression, it looked something
like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Sum( Aggr(
Fabs( Sum(spendqty) – Sum(budgetqty) ), SProgram, SRegion))&lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;The business
requirement had changed and I needed to provide a method so the person using
the document could choose the level at which to calculate the differences and
the level could involve one or two different fields and a choice of weekly or
monthly time period. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;I decided to
use a method that would eliminate the need for &lt;i&gt;&lt;u&gt;if&lt;/u&gt;&lt;/i&gt; statements in the expression
and also provide an easy way to add more choices in the future. First, I built
an inline load of the choices in the loadscript (a data island since the field names do not
appear in any other table):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;CALC_LEVEL:&lt;br /&gt;
Load * Inline &lt;br /&gt;
[CALCLVL_DESC : CALCLVL_CODE &lt;br /&gt;
Program, Region, Weekly : SProgram, SRegion, WEEK_start_date&lt;br /&gt;
Program National, Weekly : SProgram, WEEK_start_date &lt;br /&gt;
Region, Weekly : SRegion, WEEK_start_date&lt;br /&gt;
Program, Region, Monthly : SProgram, SRegion, Fiscal_period445&lt;br /&gt;
Program National, Monthly : SProgram, Fiscal_period445&lt;br /&gt;
Region, Monthly : SRegion, Fiscal_period445&lt;br /&gt;
] (delimiter is &#39;:&#39;); &lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Note that I
specified a colon as the field delimiter so that I could include commas in the
field values of CALCLVL_DESC. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;In the
document, I created a &lt;i&gt;Listbox&lt;/i&gt; for the CALCLVL_DESC field and titled it &lt;i&gt;“Please
choose a calculation level:”&lt;/i&gt; So, the business user can see the possible choices using familiar words
that make sense in a business context. The listbox was configured for &lt;i&gt;Always One Selected Value&lt;/i&gt;. When
the user makes a selection of CALCLVL_DESC it means that there is only one available
value of CALCLVL_CODE which is important for making the expression work
correctly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;The dimension
part of the Aggr function was changed so that the expression now looks like
this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Sum( Aggr(
Fabs( Sum(spendqty) – Sum(budgetqty) ), &lt;span style=&quot;background-color: yellow;&quot;&gt;$(=CALCLVL_CODE)&lt;/span&gt; ))&lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;That makes
the dimension part of the Aggr function take on the specific field names listed
in the CALCLVL_CODE value. It allows the user’s choice to automatically control
the fields used in the dimension. Adding new choices in the future would be a
matter of adding new lines to the inline load. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;This is a powerful technique, it is not limited to the Aggr function or an inline load data island.&lt;i&gt; It can replace an entire expression or any part of an expression based on the current selection&lt;/i&gt; (as you read that sentence, keep in mind how flexible and powerful the concept of selection is for QlikView). &amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★★★&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2822719165152113202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/2822719165152113202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2822719165152113202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2822719165152113202'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2014/12/aggr-function-with-flexible-choosable.html' title='Function With Flexible, Choosable Dimensions'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_T8oYhmpk6N7hA0GIzP377XlsxzZYZphYaDtYYGbSzGuxEfupfiXCjroMN4_80BXYmGvmQ-kStT-XclX8frw5TWhHF19aj4emkMaTMFAnYoZ0ZIdF0PC01xeyjUidk1fZhYnDefbB2OWZ/s72-c/20140117TB_9887_blogsmall.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6124312666225902809</id><published>2014-11-25T21:24:00.001-05:00</published><updated>2014-11-26T11:30:30.123-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><title type='text'>Problem: Drag and Drop Straight Table Columns Not Working</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkGgqyz0vXrKCBzCvKhItp5IWAvmLXV0iZpET6OJHFr_sKJylqmrF892zmlVFKwbMVny6ZVqM7fxVjITZKK0p-gKQyiGhErSvAOkDgZWeDLstz7V_jl7S0bbdMh78gTBjRHe5faLcFaGmG/s1600/20141005TB_1327_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkGgqyz0vXrKCBzCvKhItp5IWAvmLXV0iZpET6OJHFr_sKJylqmrF892zmlVFKwbMVny6ZVqM7fxVjITZKK0p-gKQyiGhErSvAOkDgZWeDLstz7V_jl7S0bbdMh78gTBjRHe5faLcFaGmG/s1600/20141005TB_1327_blogsmall.jpg&quot; height=&quot;212&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;One of the
other consultants at work came to me last week with a seemingly odd problem.
She had a document with a straight table that originally had one dimension
column. She added two more dimension columns and QlikView added the new columns
on the right-hand side of the table. But, my co-worker wanted all three
dimension columns to be on the left of the table which is the way we usually set up a straight table. Normally, dragging the new columns
over to the left should be quick and easy… but, no matter how many times she tried,
the new columns could not be dragged and stayed stubbornly on the right. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;After close
examination, some trial and error, and a bit of logical thinking; the source of
the problem became clear. The thing that was interfering with the drag-and-drop
of the dimension columns was the few columns in the chart that were not
visible. In this case, there were two kinds: a &lt;i&gt;hidden&lt;/i&gt; column, and three&lt;i&gt; conditional&lt;/i&gt; columns
that would only be visible under specific conditions.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;The source of
the problem suggested a solution:&amp;nbsp;
right-click on the straight table, select &lt;i&gt;Properties&lt;/i&gt; and choose the &lt;i&gt;Presentation&lt;/i&gt;
tab. One by one, click on each of the columns shown on the Presentation tab and
make sure the &lt;i&gt;Show Column&lt;/i&gt; radio button is selected for all columns (not &lt;i&gt;Hidden&lt;/i&gt; or &lt;i&gt;Conditional&lt;/i&gt;).
Then, when all columns are visible, the drag-and-drop will work normally. After
rearranging the columns as desired, use the chart Properties and Presentation
tab again to restore the hidden columns and conditional columns.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;One of the blog comments below suggests there is another type of non-visible column that would affect a &lt;em&gt;Table Box&lt;/em&gt;: a column referring to a field no longer available in the document. You would have to edit properties for the Table Box and remove the field that no longer exists to restore drag-and-drop capability.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;MS Gothic&#39;;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;MS Gothic&#39;;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;MS Gothic&#39;;&quot;&gt;★&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6124312666225902809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/6124312666225902809' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6124312666225902809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6124312666225902809'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2014/11/problem-drag-and-drop-straight-table.html' title='Problem: Drag and Drop Straight Table Columns Not Working'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkGgqyz0vXrKCBzCvKhItp5IWAvmLXV0iZpET6OJHFr_sKJylqmrF892zmlVFKwbMVny6ZVqM7fxVjITZKK0p-gKQyiGhErSvAOkDgZWeDLstz7V_jl7S0bbdMh78gTBjRHe5faLcFaGmG/s72-c/20141005TB_1327_blogsmall.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-8140062107299483001</id><published>2014-04-24T17:23:00.000-04:00</published><updated>2014-04-24T17:23:43.276-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="field names"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><title type='text'>Note About Dollar-sign Expansion</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilIFy-U6DeD-wtUauEf9f4vsv2ittxcrLysbX4ebBXWmSnujQ-kGmeXyZtqHluKEEIjQBPqlbVKlCcRcTSRrWoXkQHdxX5isKKka1eRuEbRRZ4q1HkmmAqcAe84gC7MX0OSM-zS_pfS571/s1600/20130907TB_8785_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilIFy-U6DeD-wtUauEf9f4vsv2ittxcrLysbX4ebBXWmSnujQ-kGmeXyZtqHluKEEIjQBPqlbVKlCcRcTSRrWoXkQHdxX5isKKka1eRuEbRRZ4q1HkmmAqcAe84gC7MX0OSM-zS_pfS571/s1600/20130907TB_8785_blogsmall.jpg&quot; height=&quot;213&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Katrina, from
the Marketing Group, came to me yesterday with a QlikView document she was
working on. It had three scatter plot charts arranged side-by-side and she
wanted to make the side-by-side comparison easier by making them all have a
similar Y-axis. She knew she wanted something for the &lt;i&gt;static max&lt;/i&gt; property of
the charts so that each would have the same maximum value for the Y-axis. She
knew the basic expression to calculate the maximum value but the charts have a cyclic or cycle-group in the dimension and she needed an expression that would work with
the cycle group.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;I knew that
she needed a &lt;i&gt;dollar sign expansion&lt;/i&gt;&amp;nbsp;(to handle the cycle group) and an &lt;i&gt;aggr&lt;/i&gt; function (to find the maximum value by dimension) so I scribbled an
expression like this on a sheet of note paper and Katrina left to try it out:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Max( aggr(
your-calculation-of-y-value, $(=getcurrentfield( your-cycle-group-name )))&lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;An hour
later, I got an email from Katrina saying that the expression&amp;nbsp;wasn&#39;t&amp;nbsp;working. I
decided to take a&amp;nbsp;closer look at her document. The cycle group dimension in the
charts is named “Scatter ExErr”. It contains a space or blank in the middle of
it—so when it is used in an expression it must be surrounded by square brackets
like this&lt;i&gt; [Scatter ExErr]&amp;nbsp;&lt;/i&gt;&amp;nbsp;&amp;nbsp; (Note that
double-quotes should work as well as square brackets.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;But, the
expression still&amp;nbsp;wasn&#39;t&amp;nbsp;working correctly and it returned a null value. When I
examined the field&amp;nbsp;names used in the cycle group I saw that some of those also contained
a space inside the field name. When you use a dollar sign expansion with a
getcurrentfield function in your expression you can think of it as though the
dollar-sign expansion &lt;i&gt;becomes&lt;/i&gt; the field name before QlikView calculates the
expression. Since the field name contains an embedded space then it must also
be surrounded by square brackets and in this expression that means surrounding
the dollar-sign expansion in square brackets. Katrina’s expression now has two
pairs of square brackets and looks something like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Max( aggr(
your-calculation-of-y-value, [$(=getcurrentfield([Scatter ExErr] )] ))&lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;In documents
that I develop, I avoid putting embedded spaces into any names that are not
actually visible in the charts and I use an underscore character if it is
needed to make a field or object name easier to read. If you decide to name
things with names containing embedded spaces remember that you usually have to
surround the name with square brackets or double quotes when the name is used
in a function or expression.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background: #E0E0E0; color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; font-size: 10.0pt; line-height: 115%;&quot;&gt;★★&lt;/span&gt;&lt;span style=&quot;background: #E0E0E0; color: #333333; font-family: &amp;quot;MS Mincho&amp;quot;; font-size: 10.0pt; line-height: 115%;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/8140062107299483001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/8140062107299483001' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8140062107299483001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8140062107299483001'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2014/04/note-about-dollar-sign-expansion.html' title='Note About Dollar-sign Expansion'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilIFy-U6DeD-wtUauEf9f4vsv2ittxcrLysbX4ebBXWmSnujQ-kGmeXyZtqHluKEEIjQBPqlbVKlCcRcTSRrWoXkQHdxX5isKKka1eRuEbRRZ4q1HkmmAqcAe84gC7MX0OSM-zS_pfS571/s72-c/20130907TB_8785_blogsmall.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6564697791356050070</id><published>2014-04-11T16:07:00.000-04:00</published><updated>2016-08-31T16:31:42.547-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="set analysis"/><title type='text'>Divide a Group of Dates into 2 Groups (so you can tell if the business measurement is getting better or worse)</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-CrtWVA4QC0q4WIkw_qnT7V1llAiugNSea4eoPo0T0wh_GW8kN8U95tRWEpkMIO3a4gYg4-zYvd_vgq9W6_ZXCY99mAaPyhf4fcf1yEgzYxxK0IfxZxKwK7gwrg5BKq26leuA4cgI86y/s1600/20130907TB_8699_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-CrtWVA4QC0q4WIkw_qnT7V1llAiugNSea4eoPo0T0wh_GW8kN8U95tRWEpkMIO3a4gYg4-zYvd_vgq9W6_ZXCY99mAaPyhf4fcf1yEgzYxxK0IfxZxKwK7gwrg5BKq26leuA4cgI86y/s1600/20130907TB_8699_blogsmall.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;Author&#39;s Note: &amp;nbsp;This is an interesting technique but I believe a simpler and more general purpose method is in a blog post from Aug 2016. Search on &quot;QlikView Maven Is My KPI Getting Worse or Getting Better&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;I did a
weekend project several weeks ago where I was working with a database
containing some business measurements taken each day over a long stretch of
time. I wanted an easy way to visualize whether the aggregate measurements were
getting better or worse over time. In order to satisfy the “easy” part of that
objective, I decided to build expressions that would automatically split the
available measurement dates into two groups:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;
&lt;/span&gt;the earliest half of the dates and the latest half of the dates. That
would allow me to create charts with a heat map feature that easily identifies
areas for further investigation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;I won’t
complicate this story with details of the business measurements or with details
of how to create heat map colors (for more info, search for “QlikView Colormap
Wizard”). We’ll call the measurement &lt;em&gt;sorg_delta&lt;/em&gt; and do a &lt;em&gt;Sum&lt;/em&gt; of those values
over the dates.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;I made a
simplifying assumption that I would always have a contiguous span of dates. So,
calculating the &lt;em&gt;median&lt;/em&gt; date would give me the middle date that splits the group
of dates into the two half groups that I need. Using set analysis syntax to
make the sum function operate over the early half of the dates looks like this:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;Sum({&amp;lt;MDate={&#39;&amp;lt;=$(=Date(median(MDate)))&#39;}&amp;gt;} sorg_delta)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;But, I can’t
do something a simple as that for the other half of the dates because I may be
working with an odd number of days and any comparison of the data must be done
for the same number of measurements otherwise it would affect a comparison of
the aggregate business measurement between the two groups. So, the other half
of the expression that includes the later half of the dates looks like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
Sum({&amp;lt;MDate={&#39;&amp;gt;$(=Date(median(MDate)+if(odd(count(distinct MDate)),1,0)))&#39;}&amp;gt;} sorg_delta)&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;The complete
expression used in my charts subtracted the sum of earlier date measurements
from the sum of later date measurements. Whether that difference is a positive
or negative number tells whether the business measurement is getting “better”
or “worse” and the size of the difference tells us how much better or worse the
measurement has become. That logic was used with a heat map feature to color
bars in a graph either reddish or greenish and it helped turn a simple bar
graph into a relatively simple-to-understand multivariate analysis chart.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background: rgb(224 , 224 , 224); color: #333333; font-family: &amp;quot;ms gothic&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;★★&lt;/span&gt;&lt;span style=&quot;background: rgb(224 , 224 , 224); color: #333333; font-family: &amp;quot;ms mincho&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6564697791356050070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/6564697791356050070' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6564697791356050070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6564697791356050070'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2014/04/i-did-aweekend-project-several-weeks.html' title='Divide a Group of Dates into 2 Groups (so you can tell if the business measurement is getting better or worse)'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-CrtWVA4QC0q4WIkw_qnT7V1llAiugNSea4eoPo0T0wh_GW8kN8U95tRWEpkMIO3a4gYg4-zYvd_vgq9W6_ZXCY99mAaPyhf4fcf1yEgzYxxK0IfxZxKwK7gwrg5BKq26leuA4cgI86y/s72-c/20130907TB_8699_blogsmall.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4001484556117672305</id><published>2014-04-05T13:17:00.000-04:00</published><updated>2014-04-06T10:46:52.578-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><title type='text'>Inline Load with Where Clause</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMFePbrmsVv7EC2XOeHNlrw0W9uGpXp5aS6NJNL1onWDP_o3FXG2Vn6OESJWi8PnEhkwyY3KdQPla7MwAjlGmbqAcejokofjireiaM_thDrKZ-EFnKZHGBYTstysp_OpPCXuSeK7INZWcT/s1600/20131221TB_9389_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMFePbrmsVv7EC2XOeHNlrw0W9uGpXp5aS6NJNL1onWDP_o3FXG2Vn6OESJWi8PnEhkwyY3KdQPla7MwAjlGmbqAcejokofjireiaM_thDrKZ-EFnKZHGBYTstysp_OpPCXuSeK7INZWcT/s1600/20131221TB_9389_blogsmall.jpg&quot; height=&quot;320&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;You wouldn’t
ordinarily use a&lt;em&gt; Where clause&lt;/em&gt; with an inline load… after all, if you didn’t
want all of the rows why bother typing them? But, as an example, I had a
project two weeks ago where an inline load with a Where clause helped solve a
problem. It was a QlikView document that could load data from any one of
several dozen companies. The data included a company code but not the company
name or any other friendly details for me to use in the document.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;I coded an
inline load with a row for each of the possible companies. In the loadscript,
after loading the company data, I coded an extract of the company code from the
data and stored it in a variable named &lt;em&gt;var_cmp_code&lt;/em&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;The inline
load, simplified here, looked something like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;COMPANY_INFO:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Load * inline&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;[&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;cmp_code,
company_name, company_industry&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;BA, Boeing,
Aerospace&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;CCC, Chesterfield Coal Co, Mining and Minerals&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

LPL, London Pastry Ltd, Stale Biscuits&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Where cmp_code
= &#39;$(var_cmp_code)&#39;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Since each
load of the document is loading data for one company, the Where clause on the
inline load makes it load one row only and each field name, therefore, has only
one value. That allowed me to use company_name or any of the other field names
in chart titles and text boxes. For example, I used a text expression in a
chart title like this:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;=&#39;Future Health
Care Risk by Year for &#39; &amp;amp; company_name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Remember that
an inline load is like any other load except that the data is typed directly
into the loadscript instead of being loaded from a separate file or database.
In addition to a Where clause, you could code a While, Autogenerate, mapping table, Concatenate, Qualify, or the various types of joins
available in a loadscript.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;background: rgb(224, 224, 224); color: #333333; font-family: &amp;quot;MS Gothic&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;★&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: rgb(224, 224, 224); color: #333333; font-family: &amp;quot;MS Mincho&amp;quot;; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; word-spacing: 0px;&quot;&gt;★&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4001484556117672305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/4001484556117672305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4001484556117672305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4001484556117672305'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2014/04/inline-load-with-where-clause.html' title='Inline Load with Where Clause'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMFePbrmsVv7EC2XOeHNlrw0W9uGpXp5aS6NJNL1onWDP_o3FXG2Vn6OESJWi8PnEhkwyY3KdQPla7MwAjlGmbqAcejokofjireiaM_thDrKZ-EFnKZHGBYTstysp_OpPCXuSeK7INZWcT/s72-c/20131221TB_9389_blogsmall.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1128735600162132341</id><published>2014-04-02T19:03:00.001-04:00</published><updated>2014-04-02T19:09:39.294-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>Oracle Hint in the Loadscript</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrL4wf4bXAdQG9BrHrTQ_kHkzyEcdYoxMRTb3GtRRdl1tn3hf8OByAsHcJB6vvSjhYXOjCVMgmLOGHvMc_DBP7iKKA_mlTYuPs43F1phPG-Dx_IScP_2aEof4fJ7Wr_fJJqwo-Fjd2e_dR/s1600/20130811TB_8141_blogsmall.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrL4wf4bXAdQG9BrHrTQ_kHkzyEcdYoxMRTb3GtRRdl1tn3hf8OByAsHcJB6vvSjhYXOjCVMgmLOGHvMc_DBP7iKKA_mlTYuPs43F1phPG-Dx_IScP_2aEof4fJ7Wr_fJJqwo-Fjd2e_dR/s1600/20130811TB_8141_blogsmall.jpg&quot; height=&quot;212&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;People who
load data from an Oracle database into QlikView may sometimes want to use an
&lt;em&gt;Oracle hint&lt;/em&gt; in the SQL query code. An Oracle hint tells Oracle about how you
would like it to plan and execute the query in order to get&amp;nbsp;faster, more efficient
execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;The Oracle
hint syntax is actually a comment embedded in the SQL query. For example, the
hint to tell Oracle to use up to four parallel processors might look like this
in the first line of the query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;SELECT /*+
parallel(4) */ CUSTOMER, SUM(ORD_QTY) FROM &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;. . .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;If you simply
code a query like that in the loadscript you won’t get an error or a warning, the query will return data,
but you won’t get the performance improvement you were hoping for either. That’s
because QlikView doesn’t ordinarily pass comments through to the SQL processor.
Oracle would never see your hint.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;What is
needed, is for you to tell QlikView not to strip out the comments before passing
the query into the SQL processor. Code a line like this before your loadscript
table definition:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;Set
StripComments = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;ORDER_TABLE:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;SELECT /*+
parallel(4) */ CUSTOMER, SUM(ORD_QTY) FROM &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;. . .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;The
&lt;em&gt;StripComments&lt;/em&gt; variable is a system variable that controls QlikView behavior. Setting the variable to zero tells QlikView not to strip out the comments.&amp;nbsp;It
is a good practice to turn StripComments back on after the query with a line
like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Set
StripComments = 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;One thing to
look out for is any other comments in your code. If you have a regular
loadscript comment &lt;strong&gt;//&lt;/strong&gt;(a comment beginning with two slashes) mixed in with your SQL
code then it will cause a SQL error when it gets passed in to the SQL processor.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;MS Mincho&amp;quot;; mso-bidi-font-family: &amp;quot;MS Mincho&amp;quot;;&quot;&gt;★&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: &amp;quot;MS Mincho&amp;quot;; mso-bidi-font-family: &amp;quot;MS Mincho&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1128735600162132341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/1128735600162132341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1128735600162132341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1128735600162132341'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2014/04/oracle-hint-in-loadscript.html' title='Oracle Hint in the Loadscript'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrL4wf4bXAdQG9BrHrTQ_kHkzyEcdYoxMRTb3GtRRdl1tn3hf8OByAsHcJB6vvSjhYXOjCVMgmLOGHvMc_DBP7iKKA_mlTYuPs43F1phPG-Dx_IScP_2aEof4fJ7Wr_fJJqwo-Fjd2e_dR/s72-c/20130811TB_8141_blogsmall.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6702991751076983734</id><published>2013-06-16T15:18:00.000-04:00</published><updated>2013-07-28T11:23:51.657-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chart"/><category scheme="http://www.blogger.com/atom/ns#" term="expression"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="sheet object"/><category scheme="http://www.blogger.com/atom/ns#" term="text files"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>Maven&#39;s Sliding Window</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4mJd46WjPp3IahS_kxS9QVfNbispWciDgfqc2lES7thlaNwdzBjZt59CNYduE4dA-pVGiNyvmx4nH-XONGlKCkueQ2XcyY5zOrliEXsTKlp7gJsmd1iMBdXfWC6mDp5RGyYpxXw2i0tXX/s1600/20130608TB_exertion.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4mJd46WjPp3IahS_kxS9QVfNbispWciDgfqc2lES7thlaNwdzBjZt59CNYduE4dA-pVGiNyvmx4nH-XONGlKCkueQ2XcyY5zOrliEXsTKlp7gJsmd1iMBdXfWC6mDp5RGyYpxXw2i0tXX/s320/20130608TB_exertion.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;Expanding on the example from last time about loading unstructured text data (to read about it, search on &lt;i&gt;QlikView Maven Loading an Unstructured Text File&lt;/i&gt;); here’s one way to examine the data. I call it &lt;i&gt;Maven’s Sliding Window&lt;/i&gt;. My requirement was to design a method that would allow a straight table to review the rows of text even though there may be a million rows or more. It had to work even though there may be a special selection applied (for example, a selection of all rows containing the word “program”). The straight table had to show just a very small subset of the rows at any one time to avoid the memory issue that would occur if the straight table tried to show many thousands of rows.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;[If there was no selection already applied then this task is easy and no special object is required—just select a contiguous group of 20 rows and you can page though the data 20 rows at a time with the &lt;i&gt;Page Up&lt;/i&gt; or &lt;i&gt;Page Down&lt;/i&gt; keys on your keyboard.]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;First, create a variable named &lt;i&gt;vFinger&lt;/i&gt; with a current value of 1 and a constraint so that it contains positive integers. Now, create a Slider Object to update the value of vFinger. In the General tab set Mode to &lt;i&gt;Single Value&lt;/i&gt;, set Min Value to &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;=min(recno)&lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;, set Max Value to &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;=max(recno)&lt;/span&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;, click the static step box and put &lt;i&gt;1&lt;/i&gt; in the static step box. I made the Caption tab title say “Window Pointer”. Make the slider have a vertical orientation to help make the usage a little more intuitive.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;Now, set up a straight table object. Set up a calculated dimension named &lt;i&gt;recno&lt;/i&gt; with an expression like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&amp;nbsp;=If(aggr(rank(-if(recno&amp;gt;$(vFinger),recno)),recno)&amp;lt;=20,recno)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;And set up one expression defined simply as &amp;nbsp;logtext &amp;nbsp;(remember that we are still working with the data loaded in the example from 6May2013)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;On the Sort tab specify that the dimension recno is sorted &lt;i&gt;ascending numeric&lt;/i&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;In my simple example, I made the object title a text expression like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;=&#39;Sliding Window Text from $(File_Pathname):&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;so that the title uses the variable containing the file pathname to show where the data came from.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;That gives us a straight table that is showing only the records surrounding the record number specified by the vFinger variable. Using the slider that controls vFinger controls which section of text appears in the straight table. You could make the “window” bigger by changing the numbers in the calculated dimension.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;Add a &lt;i&gt;Page Down &lt;/i&gt;button that updates the value of vFinger to move the window “down”. The metaphor of a sliding window means that sliding down goes toward larger recno values and sliding the window “up” goes toward the lower recno values. The button action would be &lt;i&gt;Set Variable&lt;/i&gt; to update the vFinger variable. The action Value would be &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;=max(If(aggr(rank(-if(recno&amp;gt;$(vFinger),recno)),recno)&amp;lt;=20,recno))&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;That adds to the vFinger variable while staying within the recno values that are selected.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;A similar &lt;i&gt;Page Up&lt;/i&gt; button would contain a Set Variable action to update vFinger with a value like this &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;=min(If(aggr(rank(if(recno&amp;lt;$(vFinger),recno)),recno)&amp;lt;=20,recno))&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;If I’m working with long text records then I often set up slider objects to control which text columns appear in the straight table. For example, you could set up a slider with horizontal orientation to control the value of a variable named &lt;i&gt;startcol&lt;/i&gt; and a slider to control a variable named &lt;i&gt;endcol&lt;/i&gt;. Then, in the expression, instead of simply specifying logtext, code this text expression: &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Mid(logtext,startcol,(endcol-startcol)+1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;That will allow you to control which text columns appear in the straight table and you can slide that part of the “window” left and right.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;Note that you can save the document and later when you re-open it, the sliding window will still show the same group of records since it is driven by variable values that are saved along with the document.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;My example here had a record number field to use as a dimension for the straight table. But, any data that forms a series would work just as well; for example, dates, time of day or timestamps, degree/minutes/seconds of longitude, hours of operation of a machine, measurements from the Hadron Collider, etc.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;The next blog post will discuss using the power of QlikView selection and set analysis to help us examine the text data.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;★★★&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6702991751076983734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/6702991751076983734' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6702991751076983734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6702991751076983734'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2013/06/mavens-sliding-window.html' title='Maven&#39;s Sliding Window'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4mJd46WjPp3IahS_kxS9QVfNbispWciDgfqc2lES7thlaNwdzBjZt59CNYduE4dA-pVGiNyvmx4nH-XONGlKCkueQ2XcyY5zOrliEXsTKlp7gJsmd1iMBdXfWC6mDp5RGyYpxXw2i0tXX/s72-c/20130608TB_exertion.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4588948185722726910</id><published>2013-05-06T09:51:00.000-04:00</published><updated>2013-06-17T22:25:25.328-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadscript"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="text files"/><category scheme="http://www.blogger.com/atom/ns#" term="toolkit"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><title type='text'>Loading an Unstructured Text File</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdEizKHvHgmWBiW5f8awNIva9Y5myiWfwKwwiWSc2GdTp9SBkw47aljNLfsaYydquto9YfiJBuzUnlOWKDdFmkGH0RFZmVzDsrz_wyBdKJm8AOxsCTccGYxxDDeA-J4Ra79aKjbKjQVAjL/s1600/20130505TB_SHES_motorcycle_ride.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdEizKHvHgmWBiW5f8awNIva9Y5myiWfwKwwiWSc2GdTp9SBkw47aljNLfsaYydquto9YfiJBuzUnlOWKDdFmkGH0RFZmVzDsrz_wyBdKJm8AOxsCTccGYxxDDeA-J4Ra79aKjbKjQVAjL/s320/20130505TB_SHES_motorcycle_ride.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This is the start of a series of postings about dealing with unstructured text data.&amp;nbsp;I&#39;ve&amp;nbsp;used QlikView to help analyze message log files and error files and even program source code – there are some things QlikView can do that Notepad style text editors cannot.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;First, we need to load the data. It isn’t always a completely unstructured file like my example, often the text is one or more fields inside a structured file or database. &amp;nbsp;There are various ways to load a text file; this is what I usually put into the loadscript:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;TEXTFILE:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;LOAD&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;RecNo() as recno,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;@1 as rectext&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;[$(File_Pathname)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;(txt, no labels, delimiter is \x7, no quotes);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That code will load each record from the text file into the &lt;i&gt;rectext &lt;/i&gt;field. I use a variable for the file pathname because I usually use a loadscript like this with a document where the user can supply a filename through an inputbox. Alternatively, you could add browse-for-file functionality like I wrote about in March 2009 (search on &lt;i&gt;QlikView Maven Browse-for-File Macro Button&lt;/i&gt;). Because the data is unstructured and the document objects are meant to be used with unstructured data, the document works well as a general-purpose tool that can be used with many types of data in varying situations.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I defined the file as though it is delimited and made the specified delimiter an uncommon character I don’t expect to find in the data.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The record number, loaded as &lt;i&gt;recno&lt;/i&gt;, from the input file is a useful piece of data and we’ll be using it in some of the example objects over the next few postings.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;MS Gothic&amp;quot;; mso-bidi-font-family: &amp;quot;MS Gothic&amp;quot;;&quot;&gt;★&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;MS Mincho&amp;quot;; mso-bidi-font-family: &amp;quot;MS Mincho&amp;quot;;&quot;&gt;★&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4588948185722726910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3174073825360154810/4588948185722726910' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4588948185722726910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4588948185722726910'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2013/05/loading-unstructured-text-file.html' title='Loading an Unstructured Text File'/><author><name>-TB</name><uri>http://www.blogger.com/profile/08386812862574514289</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbQ_HVQYOwWRQ0VeLsLiYDmjV43jcpK1rYXSB8bRffXz68SxvrmmSmnzy7fOqG0Haw-73j05xzn4JTPiz8mzqOvQhTWHdjRD2maJ_hxy87NR3tWVm2wQ1mz-20ajY3lY/s143/2013_Tim_Benoit.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdEizKHvHgmWBiW5f8awNIva9Y5myiWfwKwwiWSc2GdTp9SBkw47aljNLfsaYydquto9YfiJBuzUnlOWKDdFmkGH0RFZmVzDsrz_wyBdKJm8AOxsCTccGYxxDDeA-J4Ra79aKjbKjQVAjL/s72-c/20130505TB_SHES_motorcycle_ride.jpg" height="72" width="72"/><thr:total>3</thr:total></entry></feed>