<?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: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>2012-01-28T10:08:31.582-05:00</updated><category term='table names'/><category term='qvw'/><category term='macros'/><category term='file size'/><category term='tutorial'/><category term='trigger'/><category term='drop table'/><category term='dimension'/><category term='expression'/><category term='reference manual'/><category term='loadscript text files'/><category term='memory'/><category term='bookmarks'/><category term='weekstart'/><category term='copy chart'/><category term='chart'/><category term='field names'/><category term='partial reload'/><category term='sheet object'/><category term='errors'/><category term='selection'/><category term='script'/><category term='performance'/><category term='.bat script'/><category term='image'/><category term='command line'/><category term='data compression'/><category term='vbscript'/><category term='automation'/><category term='blogs'/><category term='variables'/><category term='loadscript'/><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 tries to help co-workers get the most out of their data. A mix of tips for both beginners and advanced users.
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?max-results=100'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>75</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2505949388175036489</id><published>2011-12-16T17:40:00.006-05:00</published><updated>2011-12-17T09:17:03.837-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='sheet object'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><category scheme='http://www.blogger.com/atom/ns#' term='trigger'/><title type='text'>Count of Rows in a Chart</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/-ul7Zl94XOG4/TuvK4qBtdSI/AAAAAAAADt4/WPKqsUYr8h8/s1600/Charles2011.png.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 321px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5686862029188330786" border="0" alt="" src="http://1.bp.blogspot.com/-ul7Zl94XOG4/TuvK4qBtdSI/AAAAAAAADt4/WPKqsUYr8h8/s400/Charles2011.png.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Once in a while someone asks me if there's a way to count the rows in a chart and put the number of rows in the chart title. I usually respond by asking, "&lt;em&gt;why&lt;/em&gt; would anyone want to do &lt;em&gt;that&lt;/em&gt;?" Usually, an expression that counts the distinct values of the fields used as the chart dimension is close enough. If you want a method that actually counts the rows in a straight table chart, here's something I have used that counts the rows and puts the count into a variable named &lt;em&gt;chart_row_count&lt;/em&gt;. It will need to be modified for your environment and tested. (&lt;strong&gt;***&lt;/strong&gt;make sure you also see the suggestion near the end)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Create a macro in the module code that looks like this:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Sub Count_Rows&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'------------- &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'/* Put your chart object id in the next line */&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set CHRT=ActiveDocument.GetSheetObject("CH70")&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error resume next&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'/* in the next line, put an upper limit on the */&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'/* loop bigger than your expected chart row count */&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;For i=1 to 500 &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ccontent=CHRT.GetCell(i,0).text&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &amp;lt;&amp;gt; 0 then&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error goto 0&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveDocument.Variables("chart_row_count").SetContent i-1, True&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit For&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Next&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error goto 0&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set CHRT=nothing&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End sub&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;The count in the variable includes the total line if there is one. You can use the variable value in a text expression in your chart title. One thing you must do that will vary from document to document depending on your requirements-- you must figure out how to trigger the macro when the number of rows in the chart might have changed. Triggering when a selection changes is easy to do. Triggering when a cycle group is changed will be harder. For testing, use a button to trigger the macro.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;*** nrbhattad&lt;/em&gt; suggests this &lt;strong&gt;much simpler&lt;/strong&gt; macro for finding row count:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;set chart=ActiveDocument.GetSheetObject("CH01")&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveDocument.Variables("chart_row_count").SetContent chart.GetNoOfRows, true&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2505949388175036489?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2505949388175036489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2505949388175036489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2505949388175036489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2505949388175036489'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/12/count-of-rows-in-chart.html' title='Count of Rows in a Chart'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-ul7Zl94XOG4/TuvK4qBtdSI/AAAAAAAADt4/WPKqsUYr8h8/s72-c/Charles2011.png.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1991273271823520298</id><published>2011-11-18T13:01:00.005-05:00</published><updated>2011-12-06T20:32:07.562-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Select Top 4 Values On Open</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/-jL5rqszVy-I/Tsaeui8R7fI/AAAAAAAADkI/nEh5DTOHQm8/s1600/20110918TB_Sentinels.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 266px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5676398902837898738" border="0" alt="" src="http://4.bp.blogspot.com/-jL5rqszVy-I/Tsaeui8R7fI/AAAAAAAADkI/nEh5DTOHQm8/s400/20110918TB_Sentinels.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I was working on a document that contained a lot of data and the performance when the document was opened or when the user moved from tab to tab was a little slow. On my own laptop when I save documents like that I usually make a selection of a small amount of data so that later when I open the document again it will open quickly. I wanted to do something like that for the users -- some kind of selection that would happen automatically when the document is opened, but it had to be a selection of data that would be useful and easy for the users to understand. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The data in the document was organized by a date field named POSTDATE so I decided that I would like the document to automatically select the most recent four POSTDATE values when it was opened. Most users look in the document for the most recent data and anyone who wanted to review older data could easily add older dates to the selection through the multibox.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The method I used is to create a trigger that would fire when the document is opened. The trigger would do a &lt;em&gt;Pareto Select&lt;/em&gt;. Now, I'm not saying that this is the best way to accomplish the selection and it certainly is not the only way, but it was easy and didn't involve writing macro code.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Pareto Select is used to select a percentage of values in a field based on ranking of a value or expression. It is commonly used select things like the top 20% best selling products. In this case I wanted to use it to select not a fixed percentage but the four most recent POSTDATE date values. This is what I did:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;From the menu choose &lt;em&gt;Settings-&amp;gt;Document Properties&lt;/em&gt; and choose the &lt;em&gt;Triggers&lt;/em&gt; tab.&lt;br /&gt;In the document event triggers click the &lt;em&gt;Add Action&lt;/em&gt; button for the &lt;em&gt;OnOpen&lt;/em&gt; event.&lt;br /&gt;Click &lt;em&gt;Add Action&lt;/em&gt; and in the Add Action dialog choose &lt;em&gt;Action Type=Selection&lt;/em&gt; and &lt;em&gt;Action=Pareto Select&lt;/em&gt; then click &lt;em&gt;OK&lt;/em&gt;.&lt;br /&gt;In the Actions dialog type POSTDATE into both the Field and Selection boxes. POSTDATE is not only the field I want to select but also the expression value I want ranked.&lt;br /&gt;Then, in the Percentage box enter &lt;span style="font-family:courier new;font-size:85%;"&gt;=(4/COUNT(DISTINCT POSTDATE))*100&lt;br /&gt;&lt;/span&gt;And click &lt;em&gt;OK&lt;/em&gt;. Save the document and the next time it is opened it will automatically select the four most recent POSTDATE values.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;A similar method could be used to do automatic selection of any number of top values of any field. Pareto Select does its selection based on the current &lt;em&gt;Possible&lt;/em&gt; values. If you wanted to ignore the current selection and select a percentage of all values then you should add an extra action to the trigger to clear the field before making the Pareto Selection.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Testing trigger actions is most easily done by defining the same actions for a button and then you can test the action by clicking the button. When you're done testing, remove the button and make sure the actions are associated with the proper event.&lt;/p&gt;= = = = = = = = = = = = = = = = = = = = = = = = = =&lt;br /&gt;Author's Note 6Dec2011: &lt;br /&gt;This method didn't work the way I wanted when the document already included selections on the POSTDATE field. I couldn't find any good way to deal with that using the available trigger actions. I eventually replaced the &lt;em&gt;Pareto Select&lt;/em&gt; action with a macro action that selects the four most recent POSTDATE values. The macro code looks like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;sub Top_4_POSTDATE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;set fd=ActiveDocument.GetField("POSTDATE")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;fd.Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;fd.TopSelect "=if(aggr({1} rank(POSTDATE),POSTDATE)&amp;lt;=4,POSTDATE)",4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;set fd=nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;end sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;* * *&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1991273271823520298?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1991273271823520298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1991273271823520298' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1991273271823520298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1991273271823520298'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/11/select-top-4-values-on-open.html' title='Select Top 4 Values On Open'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-jL5rqszVy-I/Tsaeui8R7fI/AAAAAAAADkI/nEh5DTOHQm8/s72-c/20110918TB_Sentinels.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1738839765508250471</id><published>2011-11-12T16:07:00.007-05:00</published><updated>2011-11-12T16:24:42.216-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><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='selection'/><title type='text'>Replace IF in Expression with Set Analysis</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/-yQzXxzbASRs/Tr7hyhZuVKI/AAAAAAAADj4/6Qp4zcDjzLA/s1600/20111009TB_4307_Radish.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 266px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5674220838609376418" border="0" alt="" src="http://1.bp.blogspot.com/-yQzXxzbASRs/Tr7hyhZuVKI/AAAAAAAADj4/6Qp4zcDjzLA/s400/20111009TB_4307_Radish.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;We often come across chart expressions that look like this:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;=sum(if(SLSTYPE='DOMESTIC',SLSTOT))&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;It is easy to understand and if your document is a normal size and working well then leave the expression alone. But, if the document is large and you are looking for ways to speed up chart performance then consider changing the expression by replacing the &lt;em&gt;"if"&lt;/em&gt; in the expression with the much faster &lt;em&gt;set analysis&lt;/em&gt; syntax. Remember that set analysis is related to the concept of QlikView selections. Set analysis syntax works by specifying temporary selections within the function. So, if we wanted to consider set analysis for our example expression we should imagine whether the expression would work ok if we removed the &lt;em&gt;"if"&lt;/em&gt; from the expression and, instead, made a selection on the SLSTYPE field to select the value DOMESTIC. If the expression would work ok in that situation then we can change the expression to use set analysis like this:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;=sum({$&amp;lt;SLSTYPE ={'DOMESTIC'}&amp;gt;} SLSTOT)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;We couldn't do that if the SLSTYPE field wasn't associated with SLSTOT because selecting the value DOMESTIC would have no effect on the expression. For example, if SLSTYPE had been defined in the loadscript as a &lt;em&gt;Data Island&lt;/em&gt; unrelated to any other data then the expression wouldn't work correctly not matter how you coded the set analysis syntax within the sum function.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Another important consideration is whether or not the report is designed for users to make their own selections on the SLSTYPE field. If users are making SLSTYPE selections then they may not like an expression that overrides their selection within the expression. If the document allows user selection on the SLSTYPE field then we should define a separate field in the loadscript that will contain the exact same values as SLSTYPE and be part of the same QlikView table and same rows. Maybe call it SLSTYPE_SA and then we can code the set analysis part of our expression using the SLSTYPE_SA field and the expression will work correctly while still respecting all other user selections.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;* * *&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1738839765508250471?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1738839765508250471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1738839765508250471' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1738839765508250471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1738839765508250471'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/11/replace-if-in-expression-with-set.html' title='Replace IF in Expression with Set Analysis'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-yQzXxzbASRs/Tr7hyhZuVKI/AAAAAAAADj4/6Qp4zcDjzLA/s72-c/20111009TB_4307_Radish.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6274744643947820163</id><published>2011-11-04T16:04:00.006-04:00</published><updated>2011-11-04T16:39:39.494-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Increasing Likelyhood of Duplicate Values While Loading Data</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/-rUHbdLeweXg/TrRGtsD2d_I/AAAAAAAADjs/tlc_q6c8XCw/s1600/20110918TB_3676_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 286px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5671235581501667314" border="0" alt="" src="http://3.bp.blogspot.com/-rUHbdLeweXg/TrRGtsD2d_I/AAAAAAAADjs/tlc_q6c8XCw/s400/20110918TB_3676_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;I was working on a QlikView document last week that loaded several kinds of sales forecast data and also actual sales for a chemical manufacturer. The forecast data came from a statistical forecasting application. The charts on the document were simple and showed the forecast data rounded to integer numbers of tons.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;The document contained a lot of data and the performance was a little slow when making selections so I looked for ways to improve performance. Examining the forecast data, I saw that although the quantities in the database were expressed in tons almost every quantity included a decimal fraction. Now, QlikView is very good at compressing data and especially good at compressing data with duplicate values since it stores each unique value for a field only once. This forecast data did not contain a lot of duplicates because of the decimal fractions. I saw that if I rounded the values as they were loaded then values like 1.001, 1.00032, 1.2, etc. would all be loaded as 1. After changing the loadscript to round values to integers as the data was loaded the report file size on disk was reduced by 40% and had a corresponding reduction in memory required. The charts on the report were not affected all.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;This technique would not be useful in all situations. It would cause a lot of trouble if you rounded data values on some accounting documents! But, sometimes, altering data slightly as it is loaded to increase the likelyhood of duplicate values can save memory for a QlikView document. Besides rounding (not necessarily to integers, you can round to a specific number of decimal places), you can also increase the likelyhood of duplicate values by: &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Truncating text data - keeping only the first ten characters, for example.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Trimming text data to remove any leading or trailing blanks.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Converting to all capital letters.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Converting non-abbreviated words to standard abbreviations, like state abbreviations in address data.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Removing the time stamp portion from date data&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Converting date data to beginning-of-week or beginning of month dates.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Converting date data to month abbreviations if that is the level of data used in the document charts. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;* * *&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6274744643947820163?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6274744643947820163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6274744643947820163' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6274744643947820163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6274744643947820163'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/11/increasing-likelyhood-of-duplicate.html' title='Increasing Likelyhood of Duplicate Values While Loading Data'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-rUHbdLeweXg/TrRGtsD2d_I/AAAAAAAADjs/tlc_q6c8XCw/s72-c/20110918TB_3676_edited-1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1389769764614719851</id><published>2011-10-23T12:29:00.003-04:00</published><updated>2011-10-23T12:37:17.225-04:00</updated><title type='text'>Using Oracle Configured for Different Countries</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/-B21zJOup5Nc/TqRCqPBYqDI/AAAAAAAADjY/auhKOgfgv8I/s1600/20110812TB_3530_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 266px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5666727524493207602" border="0" alt="" src="http://3.bp.blogspot.com/-B21zJOup5Nc/TqRCqPBYqDI/AAAAAAAADjY/auhKOgfgv8I/s400/20110812TB_3530_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;We load much of the data in our QlikView documents from Oracle databases. A common query technique uses the Oracle Next_Day function to aggregate data into weekly quantities. For example,&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Select Next_Day(INC_DATE,2)-7, Count(distinct INCIDENT_NUM) From INC_LOG group by NextDay(INC_DATE,2)-7;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;will gather a count of security incidents by week. The &lt;em&gt;Next_Day&lt;/em&gt; function in the example should return a Monday date. But, sometimes, when the Oracle database is configured for a European business then the way Oracle numbers days of the week will be different from a database in the U.S. A European database may give Tuesday dates for that example query.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;In order to make the SQL commands in a loadscript behave like they do in the U.S. I add a single SQL line to the loadscript following the ODBC Connect string that modifies the Oracle NLS setting temporarily while data is loaded into the document. The line I add after the ODBC connect string is:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL ALTER SESSION SET NLS_TERRITORY='America';&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Does anyone have a different way of dealing with this issue?&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;* * *&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1389769764614719851?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1389769764614719851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1389769764614719851' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1389769764614719851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1389769764614719851'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/10/using-oracle-configured-for-different.html' title='Using Oracle Configured for Different Countries'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-B21zJOup5Nc/TqRCqPBYqDI/AAAAAAAADjY/auhKOgfgv8I/s72-c/20110812TB_3530_edited-1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3958761213423424477</id><published>2011-08-19T13:28:00.003-04:00</published><updated>2011-08-19T13:44:16.306-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Looking Inside a Bookmark Without Opening It</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/-W0D3oB0GkEY/Tk6eCOfv_3I/AAAAAAAADjM/p_-D3MSA24s/s1600/20110808TB_1713_edited-1.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: pointer" id="BLOGGER_PHOTO_ID_5642621144230002546" border="0" alt="" src="http://4.bp.blogspot.com/-W0D3oB0GkEY/Tk6eCOfv_3I/AAAAAAAADjM/p_-D3MSA24s/s400/20110808TB_1713_edited-1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;This blog post comes from a question asked on the QlikCommunity forum. The question was how do you look at the selections inside a bookmark without actually selecting and activating the bookmark?&lt;br /&gt;&lt;br /&gt;I had never thought about how you might do that. It is not difficult to list out the possible values for a single field based on a bookmark whether the bookmark has been opened or not. For example, for a bookmark named &lt;em&gt;Feb_Sales&lt;/em&gt; and a field named &lt;em&gt;ITEM&lt;/em&gt; you can put a text expression like this into a text object or chart title:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;=concat({Feb_Sales} distinct ITEM, ', ')&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That will give you a list of the ITEM values separated by commas. Note that it is a list of &lt;em&gt;Possible&lt;/em&gt; values, it will only be the &lt;em&gt;Selected&lt;/em&gt; values if the bookmark includes a selection on that particular field.&lt;br /&gt;&lt;br /&gt;This technique can be used to give the user a peek into the selected or possible field values in the bookmarks; perhaps helping a user decide which bookmark should be used.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;* * *&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3958761213423424477?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3958761213423424477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3958761213423424477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3958761213423424477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3958761213423424477'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/08/looking-inside-bookmark-without-opening.html' title='Looking Inside a Bookmark Without Opening It'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-W0D3oB0GkEY/Tk6eCOfv_3I/AAAAAAAADjM/p_-D3MSA24s/s72-c/20110808TB_1713_edited-1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2762924841331549139</id><published>2011-07-29T11:59:00.006-04:00</published><updated>2011-07-29T12:17:48.049-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>A Chart Expression That Works Differently for Totals Row</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/-QwXed_JKdSs/TjLbUNAa8OI/AAAAAAAADeM/jqzOoZjNXd4/s1600/20110625TB_LAX_Goalie.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 265px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5634807223929204962" border="0" alt="" src="http://3.bp.blogspot.com/-QwXed_JKdSs/TjLbUNAa8OI/AAAAAAAADeM/jqzOoZjNXd4/s400/20110625TB_LAX_Goalie.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;I built a QlikView document last week with a straight table chart where I needed to have some of the expressions work differently on the totals row than on the regular rows. One of the dimensions on the chart was date -- but the totals row needed to aggregate data for the most recent date only. I wrote an expression that takes advantage of the fact that the RowNo function returns null for the totals row. So, leaving out the actual calculation part, the expression looked something like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;if(IsNull(RowNo()), &lt;cr&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;/* do the totals row calculation */ , &lt;cr&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;/* else, do the regular calculation */) &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;A similar idea can be used if you want to change the color or bold the totals row. For example, you could use an expression like this for background color: &lt;cr&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;if(IsNull(RowNo()),yellow())&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;and make the totals row look like it is emphasized with a highlighter color.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;* * *&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2762924841331549139?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2762924841331549139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2762924841331549139' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2762924841331549139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2762924841331549139'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/07/chart-expression-that-works-differently.html' title='A Chart Expression That Works Differently for Totals 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-QwXed_JKdSs/TjLbUNAa8OI/AAAAAAAADeM/jqzOoZjNXd4/s72-c/20110625TB_LAX_Goalie.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-7591852710320437869</id><published>2011-07-15T14:11:00.002-04:00</published><updated>2011-07-15T14:16:09.947-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Duplicate Rows in a QlikView Table</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/-PiaPcEglLFk/TiCDhKlmdwI/AAAAAAAADbg/PMzcbb7Wal8/s1600/20110710TB_0255_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5629644140014106370" border="0" alt="" src="http://1.bp.blogspot.com/-PiaPcEglLFk/TiCDhKlmdwI/AAAAAAAADbg/PMzcbb7Wal8/s400/20110710TB_0255_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;You may someday have a situation where you suspect that you have some duplicate rows in one of the tables within your QlikView document. It can be difficult to verify if this is true with a chart or tablebox -- you will only see a single row in the chart or tablebox even though there are duplicate rows in the table. The duplicates, though, often cause trouble with expressions. You may see an expression value that is two or three times larger than expected; this is often a symptom of duplicate rows in one of the tables.&lt;br /&gt;&lt;br /&gt;To help identify the problem, add a row number field to each row in the QlikView table. That will give you at least one field that is unique on each of the duplicate rows. You can do this without reloading the entire document. Here's an example-- First, save a backup copy of the report that you are working on. Assume that the table to which you want to add a row number is named REDFLIGHTS. Add these rows to the top of your loadscript:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;REDFLIGHTS_X:&lt;br /&gt;Add Load RowNo() as REDFLIGHTS_RowNo, * Resident REDFLIGHTS;&lt;br /&gt;Drop Table REDFLIGHTS;&lt;br /&gt;Rename Table REDFLIGHTS_X to REDFLIGHTS;&lt;br /&gt;Exit Script;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then, from the menu, select &lt;strong&gt;File-&amp;gt;Partial Reload&lt;/strong&gt; This will run the five lines you added to your loadscript and it will build a new table inside the document that is identical to your original table but with a rownumber field, &lt;em&gt;REDFLIGHTS_RowNo&lt;/em&gt;, added to the table. Now, in a tablebox that includes the rownumber field or in a chart using the key fields as dimensions and using a &lt;em&gt;count(REDFLIGHTS_RowNo)&lt;/em&gt; expression you will be able to identify the duplicate rows in the table. At that point you will have to figure out how to eliminate or handle the duplicate rows when data is loaded. Remember to remove the five lines from the top of your loadscript before you next try to reload data. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;* * * &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-7591852710320437869?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/7591852710320437869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=7591852710320437869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7591852710320437869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7591852710320437869'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/07/duplicate-rows-in-qlikview-table.html' title='Duplicate Rows in a QlikView Table'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-PiaPcEglLFk/TiCDhKlmdwI/AAAAAAAADbg/PMzcbb7Wal8/s72-c/20110710TB_0255_edited-1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2996541686536976172</id><published>2011-07-03T10:44:00.010-04:00</published><updated>2011-07-06T15:31:05.565-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Loading Multiple Files With Varying Fields</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/-JrouYOFwuQI/ThCDJsWdbAI/AAAAAAAADbQ/4GGzQmswN0k/s1600/nuts_and_bolts_on_red.jpg.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 266px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5625140137133173762" border="0" alt="" src="http://2.bp.blogspot.com/-JrouYOFwuQI/ThCDJsWdbAI/AAAAAAAADbQ/4GGzQmswN0k/s400/nuts_and_bolts_on_red.jpg.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;If you ever have a need to load multiple files into a single QlikView table and the files have similar but not identical fields then you might try the solution below. I’ve used this method where the files are historical data created at varying times and although the files have most fields in common, some of the fields have extra fields. For example, in a set of sales data files, the files for exported products might have extra fields for export license data.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Here is an example of the code from the loadscript. It loads a set of QVD files. It loads the first file normally, then loads all subsequent files using the Concatenate keyword. This allows the data, including the extra fields, to be loaded into the same QlikView table, SALES_TABLE.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;set filectr=0;&lt;br /&gt;for each sfile in filelist (e:\sales_history\QVD_SALES_MONTH*.qvd) &lt;br /&gt;&amp;nbsp;&amp;nbsp;If filectr=0 then &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SALES_TABLE:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Load * from $(sfile) (qvd);&lt;br /&gt;&amp;nbsp;&amp;nbsp;Else &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SALES_TABLE:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Concatenate Load * from $(sfile) (qvd);&lt;br /&gt;&amp;nbsp;&amp;nbsp;EndIf&lt;br /&gt;&amp;nbsp;&amp;nbsp;Let filectr=$(filectr)+1;&lt;br /&gt;next sfile&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;★ ★ ★&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2996541686536976172?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2996541686536976172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2996541686536976172' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2996541686536976172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2996541686536976172'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/07/loading-multiple-files-with-varying.html' title='Loading Multiple Files With Varying Fields'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-JrouYOFwuQI/ThCDJsWdbAI/AAAAAAAADbQ/4GGzQmswN0k/s72-c/nuts_and_bolts_on_red.jpg.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2317406496137505615</id><published>2011-06-27T21:27:00.009-04:00</published><updated>2012-01-19T10:45:28.489-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript text files'/><title type='text'>Export All Data From All QV Tables to Text Files</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/-Ac1tStK0u9I/TgkwWylI4BI/AAAAAAAADag/wAfxjfuFc2k/s1600/grassy_rest.jpg"&gt;&lt;img style="margin: 0px auto 10px; width: 400px; height: 266px; text-align: center; display: block;" id="BLOGGER_PHOTO_ID_5623078777841573906" border="0" alt="" src="http://3.bp.blogspot.com/-Ac1tStK0u9I/TgkwWylI4BI/AAAAAAAADag/wAfxjfuFc2k/s400/grassy_rest.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Last week one of our clients asked me to provide a method that they could use to export all of the data from within a QlikView document. They had hundreds of archived documents and they wanted to be able to export the data and use it in another application.&lt;br /&gt;“Sure, No problem. I’ll email you some instructions.” I sent them instructions for exporting all of the data from all QlikView tables within a document into tab-delimited text files. This is what I sent to them:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;1. Create a new folder on your laptop or server. The computer where you do this must have QlikView installed.&lt;br /&gt;&lt;br /&gt;2. Copy the QlikView .qvw document file into your folder. This will make sure you don't accidently update the original document.&lt;br /&gt;&lt;br /&gt;3. Double-click on the .qvw file to start up QlikView.&lt;br /&gt;&lt;br /&gt;4. From the menu, select &lt;strong&gt;File-&amp;gt;Edit Script&lt;/strong&gt;. This opens up the Loadscript Edit Window.&lt;br /&gt;&lt;br /&gt;5. At the very top of the loadscript, before the first line, copy and paste in these lines:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;/* Export all QlikView tables to tab-delimited files */&lt;br /&gt;if IsPartialReload() then&lt;br /&gt;for ix= 0 to 100&lt;br /&gt;let tn=trim(tablename($(ix)));&lt;br /&gt;if len('$(tn)')&amp;lt;1 then&lt;br /&gt;exit script;&lt;br /&gt;end if&lt;br /&gt;Store "$(tn)" into "EXPORTED_QV_$(tn).TXT" (txt, delimiter is "\t");&lt;br /&gt;next ix&lt;br /&gt;end if&lt;br /&gt;exit script;&lt;br /&gt;//&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;6. Close the Loadscript Edit Window by clicking the &lt;strong&gt;OK&lt;/strong&gt; button in the lower right corner of the window.&lt;br /&gt;&lt;br /&gt;7. From the menu, select &lt;strong&gt;File-&amp;gt;Partial Reload&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;8. You don't need to save the document, but if you do save it, do not copy it back to the original location.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;If everything works correctly, each of the QlikView tables will be written out as tab-delimited text files into the folder. For example, if the QlikView document contains a QlikView table named HISTCUST then it would write out a text file named, EXPORTED_QV_HISTCUST.txt. The first record will contain the field names.&lt;/div&gt;&lt;br /&gt;Note the syntax for specifying the delimiter character. If your &lt;em&gt;Store&lt;/em&gt; command simply includes &lt;span style="font-family:courier new;font-size:85%;"&gt;(txt)&lt;/span&gt; without specifying the delimiter you will get comma-delimited text files. Use the file specification, (qvd), to get QlikView QVD files.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;I would've preferred a more elegant piece of code using a &lt;em&gt;Do While&lt;/em&gt; loop but I had trouble getting the test to run correctly and I had limited time. The code above should work fine for documents with under 100 QlikView tables.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;* * *&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2317406496137505615?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2317406496137505615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2317406496137505615' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2317406496137505615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2317406496137505615'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/06/export-all-data-from-all-qv-tables-to.html' title='Export All Data From All QV Tables to Text Files'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Ac1tStK0u9I/TgkwWylI4BI/AAAAAAAADag/wAfxjfuFc2k/s72-c/grassy_rest.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3076102370959068965</id><published>2011-04-03T09:51:00.007-04:00</published><updated>2011-04-04T12:08:03.662-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Variable That Acts Like a User-Defined Function</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/-42rBIO1vkDE/TZh-6OmuAFI/AAAAAAAADH4/7acOh-WaXGo/s1600/guitar_john.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5591358476198477906" border="0" alt="" src="http://1.bp.blogspot.com/-42rBIO1vkDE/TZh-6OmuAFI/AAAAAAAADH4/7acOh-WaXGo/s400/guitar_john.jpg" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;div&gt;QlikView document variables are really just text strings with a name. In various places in the document where expressions are used you can include a variable name and QlikView will replace the name with the text string that the variable contains. It's a simple idea that can be used in many ways.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;One variation on the way to use a variable is to include an &lt;em&gt;argument&lt;/em&gt; with the variable where the argument value is provided in the larger expression where the variable is used. The technique is useful for number, currency, or date formatting. Here is an example:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Imagine that you have a document that contains some customer data including nine-digit telephone numbers and you want to show the telephone numbers formatted in U.S. style like this (123) 456-7899.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Create a variable named &lt;strong&gt;telno&lt;/strong&gt; and enter this as the variable value:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;'('&amp;amp;left($1,3)&amp;amp;') '&amp;amp;mid($1,4,3)&amp;amp;'-'&amp;amp;right($1,4)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;When we use this variable in an expression, the $1 will be replaced by the argument value. It is a text replacement operation but, because it takes place within a larger expression, the effect is like a &lt;em&gt;user-defined function&lt;/em&gt;. In our example, the customer telephone field is named CUST_PHONE. So, we can create a chart expression like this: &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;$(telno(CUST_PHONE))&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;That will show the customer telephone number in the format we need. The real value of the technique is apparent when the expression is long or complex or uses advanced techniques like user-selected formatting.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;For two arguments you can use&lt;em&gt; $2&lt;/em&gt; and it will be replaced by the second argument. The third argument will replace $3, and so on. For example, if you had a telephone extension number as a data field then it could be used in our example chart expression like this:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;$(telno(CUST_PHONE, CUST_EXT))&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;and then the variable value could include $2 which would be replaced by CUST_EXT. It might look like this:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'('&amp;amp;Left($1,3)&amp;amp;') '&amp;amp;mid($1,4,3)&amp;amp;'-'&amp;amp;right($1,4)&amp;amp;' ext '&amp;amp;$2&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This kind of variable can also be used in the loadscript. The next time you are wishing for a user-defined function you can use in the loadscript, see if this concept will do the trick.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;* * * &lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3076102370959068965?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3076102370959068965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3076102370959068965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3076102370959068965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3076102370959068965'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/04/variable-that-acts-like-user-defined.html' title='Variable That Acts Like a User-Defined 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-42rBIO1vkDE/TZh-6OmuAFI/AAAAAAAADH4/7acOh-WaXGo/s72-c/guitar_john.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6374061810652148262</id><published>2011-01-14T16:51:00.005-05:00</published><updated>2011-01-14T17:13:45.020-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Loading Scientific or E-Notation</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/TTDHhvru3RI/AAAAAAAADEQ/XJbGERgSz64/s1600/Flying_Wing.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 266px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5562164922352065810" border="0" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/TTDHhvru3RI/AAAAAAAADEQ/XJbGERgSz64/s400/Flying_Wing.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I was loading data into QlikView from a large, comma-delimited text file last week. I found that some of the numeric quantities were expressed in &lt;em&gt;scientific notation&lt;/em&gt; or &lt;em&gt;E-notation&lt;/em&gt;. Apparently, the person who had prepared the data used a reporting tool that converted some of the very large and very small numbers into scientific notation. The scientific notation numbers contain two numbers separated by an “E” character. The notation means to take the number on the left of the value and multiply by ten raised to the power of the number on the right of the value. For example, the E-notation value of &lt;span style="font-family:courier new;"&gt;&lt;strong&gt;6.02E23&lt;/strong&gt;&lt;/span&gt; means that the numeric value is 6.02 times 10 to the 23rd power. It isn’t difficult to deal with in a loadscript but this example might save you some work someday. The loadscript looked something like this:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;PROMO_HIST:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;LOAD MATERIAL, &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;WHSE, &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If(index(upper(FQTY),'E')&gt;0,&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;subfield(upper(FQTY),'E',1)*pow(10,subfield(upper(FQTY),'E',2)),&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FQTY) as FQTY &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FROM D:\Tim\Promo.csv (ansi,txt,delimiter is ',',embedded labels,msq);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;That IF statement in the loadscript converted any e-notation values in the data into numbers and for regular numeric values loaded them as usual.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Later in the day, I needed to load the same data into an Oracle table using &lt;em&gt;Sql Loader&lt;/em&gt;. Interesting that the idea is the same but the syntax is different. This is what the entry in the SqlLdr control file looked like:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FQTY "DECODE(INSTR(UPPER(:FQTY),'E'),0,:FQTY, SUBSTR(:FQTY,1,INSTR(UPPER(:FQTY),'E')-1) * POWER(10,SUBSTR(:FQTY,INSTR(UPPER(:FQTY),'E'))+1))",&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6374061810652148262?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6374061810652148262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6374061810652148262' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6374061810652148262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6374061810652148262'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2011/01/loading-scientific-or-e-notation.html' title='Loading Scientific or E-Notation'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/TTDHhvru3RI/AAAAAAAADEQ/XJbGERgSz64/s72-c/Flying_Wing.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3881795617084582138</id><published>2010-11-01T16:47:00.008-04:00</published><updated>2010-11-12T17:50:06.565-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Time interval between two timestamps</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/TM8pmeV6EQI/AAAAAAAADBk/abVZILnE5HE/s1600/20101027TB_0242_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 347px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5534688208018346242" border="0" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/TM8pmeV6EQI/AAAAAAAADBk/abVZILnE5HE/s400/20101027TB_0242_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I built a report that loads a database table of logged event data. The database table includes a datestamp field containing the date and time of the event. I wanted my report to have a chart showing the duration in hours, minutes, and seconds between the events shown on each row of the chart. That would allow me to make selections on types of events or the source of the event and the time duration between listed events would be useful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;I created a straight-table chart with a dimension of a field called EVTLOG_ID. That single field is a unique identifier that I could sort by descending value and guarantee that the rows in my chart are in chronological order with the most recent events at the top of the chart. Then I added an expression that simply said &lt;strong&gt;=EVTLOG_DATE&lt;/strong&gt; to show the timestamp field from the table. Then I added another expression like this &lt;span style="font-family:courier new;"&gt;&lt;strong&gt;=time(interval([EVTLOG_DATE]) - below([EVTLOG_DATE])),'h:mm:ss')&lt;/strong&gt;&lt;/span&gt; to show the interval between the timestamp field and the timestamp field on the lower line in the chart. The outer function, &lt;em&gt;time&lt;/em&gt;, makes the format show as hours, minutes, and seconds without the unneeded "AM" label.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;The chart works great – figuring out the elapsed time between timestamps is a tiresome chore to do in your head. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;★ ★ ★&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3881795617084582138?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3881795617084582138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3881795617084582138' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3881795617084582138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3881795617084582138'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/11/time-interval-between-two-timestamps.html' title='Time interval between two timestamps'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/TM8pmeV6EQI/AAAAAAAADBk/abVZILnE5HE/s72-c/20101027TB_0242_edited-1.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-428625401630563163</id><published>2010-10-17T20:51:00.003-04:00</published><updated>2010-11-04T13:06:40.305-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Easy Text Search</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/TLuaxtKKYPI/AAAAAAAAC_4/vrNI0f5Yqgg/s1600/jbrock7.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 266px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5529183146253902066" border="0" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/TLuaxtKKYPI/AAAAAAAAC_4/vrNI0f5Yqgg/s400/jbrock7.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;People like the feature in QlikView that lets you start typing a word or phrase on top of a listbox (or the pull-down for a particular field on a multibox) and QlikView automatically shows you a list of the fields that contain that word or phrase. Notice that when you begin typing, a small box appears that contains the word you typed in between two asterisks. For example, if you click on the listbox for product names and start typing the word “cheese” a box appears containing &lt;strong&gt;*cheese*&lt;br /&gt;&lt;/strong&gt;The feature is called a text search and the asterisks are &lt;em&gt;wildcard characters&lt;/em&gt;. The asterisk represents any string of characters… so the list of values that QlikView is showing you in our example is any group of characters, followed by “cheese”, and followed again by any group of characters… which really means any value containing the letters “cheese”. If you wanted only product names that begin with the word cheese then remove that first asterisk (so that the box contains &lt;strong&gt;cheese*&lt;/strong&gt; ) and you will see only product names beginning with the word “cheese”. Similarly, remove the second asterisk and you only see product names that end with the word “cheese”.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Another wildcard character you can use is a question mark, “&lt;span style="font-size:130%;"&gt;&lt;strong&gt;?&lt;/strong&gt;&lt;/span&gt;”. The question mark represents any single character. I use it all the time when the field is a date field in the form of mm/dd/yyyy… then , for example, I can type something like &lt;strong&gt;10/??/2010&lt;/strong&gt; and it will show me a list of all of the date values in October 2010 (“10/01/2010”,”10/02/2010”, etc.)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;(&lt;em&gt;Author's note:&lt;/em&gt;  Nov 4, 2010. With QlikView version 10 the default behavior of the listbox is not to automatically insert wildcard asterisks as you start to type text. But, the search behavior is very similar and you can still type your own wildcard characters as needed.)&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;★ ★ ★&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-428625401630563163?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/428625401630563163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=428625401630563163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/428625401630563163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/428625401630563163'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/10/easy-text-search.html' title='Easy Text Search'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/TLuaxtKKYPI/AAAAAAAAC_4/vrNI0f5Yqgg/s72-c/jbrock7.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-824042451255801450</id><published>2010-10-02T19:42:00.008-04:00</published><updated>2010-10-02T19:53:22.118-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Selecting Null Values</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/TKfEnf3SL_I/AAAAAAAAC_w/T0o9VqTS4-A/s1600/20100725TB_5840_editedBW.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 365px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5523599650840522738" border="0" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/TKfEnf3SL_I/AAAAAAAAC_w/T0o9VqTS4-A/s400/20100725TB_5840_editedBW.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;It’s true that you cannot select the &lt;em&gt;null&lt;/em&gt; values of a field. But, you can usually do something that will work even better to identify the null values. The idea is that you select values of a different field that are associated with the null values you’re interested in. As always, to help communicate the idea, here’s an example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Imagine that you have a report of sales data but there’s a defect in the data and some of the products don’t have a product description. You can’t make a selection on missing or null values in the product description field, named &lt;em&gt;PROD_DESC&lt;/em&gt; for our example, but you can easily select the &lt;em&gt;products&lt;/em&gt; that have a missing or null product description. Go to the listbox for the &lt;em&gt;PRODUCT_ID&lt;/em&gt; field or click the pull-down arrow for PRODUCT_ID from a multibox. Now, start typing this expression:&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;=isnull(PROD_DESC)&lt;/strong&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;click &lt;em&gt;Enter&lt;/em&gt; to finish the selection and you now have a selection consisting only of products that are missing their descriptions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;You can use a slightly different expression to select products with a &lt;em&gt;blank&lt;/em&gt; or null product description; type this instead &lt;span style="font-family:courier new;"&gt;&lt;strong&gt;=isnull(trim(PROD_DESC))&lt;/strong&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;This technique is useful if you use QlikView to find data quality issues or to validate data from suppliers or customers. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;★ ★ ★&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-824042451255801450?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/824042451255801450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=824042451255801450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/824042451255801450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/824042451255801450'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/10/selecting-null-values.html' title='Selecting Null Values'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/TKfEnf3SL_I/AAAAAAAAC_w/T0o9VqTS4-A/s72-c/20100725TB_5840_editedBW.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1614854196380148394</id><published>2010-09-20T18:46:00.009-04:00</published><updated>2010-11-04T12:56:52.256-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Random Sample Selection</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_JRbXQI-qRP4/TJfldyX7UYI/AAAAAAAAC3o/8iYfI897tJw/s1600/20100918TB_9203_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5519132168266928514" border="0" alt="" src="http://4.bp.blogspot.com/_JRbXQI-qRP4/TJfldyX7UYI/AAAAAAAAC3o/8iYfI897tJw/s400/20100918TB_9203_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Here’s an idea that will certainly come in handy some day. You can make a selection of random values from any field in your QlikView document. For example, imagine that you have a document loaded with your company’s employee expense report data for the past five years. And, imagine that you want to select a random twenty percent of the employees. Just click on a &lt;em&gt;listbox&lt;/em&gt; of employee names or click on a pulldown arrow of employee names on a &lt;em&gt;multibox&lt;/em&gt;. Then, type this expression:&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;=rand()&lt;=0.20&lt;/span&gt; &lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;And you will be looking at a random selection of approximately twenty percent of the company employees. Hit &lt;em&gt;Enter&lt;/em&gt; &lt;enter&gt;to complete the selection.&lt;br /&gt;&lt;br /&gt;This idea can work with any field in the document. You can also use an advanced search dialog box instead of a listbox or multibox. This kind of search expression works within the existing selections – if you had already selected only the part of your company operating in Mexico then your expression will select a random twenty percent of employees in Mexico. If you already have some employee names selected then you might want to clear the selection before using the expression. And, like I wrote in my previous blog posting, you can save an expression like this in a bookmark. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Note: If you are going to be doing this random selection several times on the same document then it may give you the same group of values each time. To make sure you get a different set of values every time you use the expression type this slightly longer expression instead:&lt;/div&gt;&lt;div&gt;&lt;strong&gt;=rand()&lt;=0.2+now()*0&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;(See the comments section below for a suggestion about how to do a random sample selection as the Calculated Dimension in a Chart)&lt;br /&gt;&lt;br /&gt;&lt;div&gt;★ ★ ★&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1614854196380148394?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1614854196380148394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1614854196380148394' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1614854196380148394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1614854196380148394'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/09/random-sample-selection.html' title='Random Sample Selection'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRbXQI-qRP4/TJfldyX7UYI/AAAAAAAAC3o/8iYfI897tJw/s72-c/20100918TB_9203_edited-1.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6775655567563408490</id><published>2010-09-16T16:04:00.009-04:00</published><updated>2010-09-17T17:54:31.492-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='trigger'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Bookmarks for Dynamic Selection</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_JRbXQI-qRP4/TJJ6BvXpJzI/AAAAAAAAC3E/EKZ7ei0WK3M/s1600/20100906TB_8680_edited-1.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5517606663796369202" border="0" alt="" src="http://4.bp.blogspot.com/_JRbXQI-qRP4/TJJ6BvXpJzI/AAAAAAAAC3E/EKZ7ei0WK3M/s400/20100906TB_8680_edited-1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I want to tell you about one of the cool things about doing a QlikView selection using a search expression. I’ve written about this topic before (&lt;a href="http://qlikviewmaven.blogspot.com/2010/07/ive-mentioned-several-times-kind-of.html" target="Selection Expressions"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;). When you’ve made the selection with a search expression and then create a bookmark, the bookmark stores the expression and not just a static list of selected values. Then, the next time you click on that bookmark it re-applies the expression!&lt;br /&gt;&lt;br /&gt;For example, if you click on a listbox of Salespersons and type &lt;span style="font-family:courier new;"&gt;=rank(sum(SlsHist))&lt;=10&lt;/span&gt; that will select the top ten Salespersons based on sales history (assuming that &lt;em&gt;SlsHist&lt;/em&gt; is your field name for sales history). Then, create a bookmark. This will work best if the selection of Salespersons is the only selection currently made on the document. Now, every time you click on that bookmark it will select the top ten Salespersons. This works within the current set of selections, so, if you’ve already selected only products sold in Canada then when you click the bookmark it will select the top ten Salespersons of products sold in Canada.&lt;br /&gt;&lt;br /&gt;You can export bookmarks, of course, and share them with others. I’ve started a small library of these search expression bookmarks that are useful for finding various data issues that need research. I just export the bookmark to a file whenever I create a new one that might be useful again someday.&lt;br /&gt;&lt;br /&gt;If you click on one of these bookmarks and nothing gets selected then it means that nothing in the document satisfies the expression criteria.&lt;br /&gt;&lt;br /&gt;Now, another cool thing: Beginning with QlikView version 9.0 you can create an &lt;em&gt;Action&lt;/em&gt; that applies a bookmark. So, you could define an action that applies one of your search expression bookmarks and apply the Action to a &lt;em&gt;Button&lt;/em&gt; or to the &lt;em&gt;On Open&lt;/em&gt; event for the document. Using this technique you could make your document do a special selection whenever the document is opened (&lt;em&gt;without writing any macros&lt;/em&gt;). Maybe you could make your executive dashboard show the ten most profitable customers over the past week whenever the document is opened.&lt;br /&gt;.&lt;br /&gt;Notes on how to write those expressions:&lt;/div&gt;&lt;div&gt;These are expressions that QlikView evaluates as either &lt;em&gt;true&lt;/em&gt; or &lt;em&gt;false&lt;/em&gt;. If you have a listbox of your company's Products and you type an equal sign, &lt;strong&gt;=&lt;/strong&gt; , and then the expression; QlikView will evaluate the expression for each Product. If the result of the expression is &lt;em&gt;true&lt;/em&gt; then the Product is selected, if the result is &lt;em&gt;false&lt;/em&gt; then the product is not selected.&lt;/div&gt;&lt;div&gt;For example, you might type &lt;span style="font-family:courier new;"&gt;=count(distinct repair_orders)&gt;100&lt;/span&gt; on your listbox of Products and QlikView will select Products with more than 100 repair orders in the report data.&lt;br /&gt;You might type =sum(invoice)&amp;lt;0 to find Products with invoices with negative amounts that need to be investigated. Or, on a listbox of hospital treatment dates type =sum(admissions)&amp;gt;sum(discharges) to find dates where more patients were admitted than sent home. &lt;/div&gt;&lt;div&gt;Mastering this technique for making selections will help make QlikView even more useful to you.&lt;/div&gt;&lt;div&gt;If you have any favorite or especially creative ways to use this technique please describe them in a blog comment (see below). &lt;/div&gt;&lt;div&gt;&lt;br /&gt;★ ★ ★ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6775655567563408490?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6775655567563408490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6775655567563408490' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6775655567563408490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6775655567563408490'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/09/bookmarks-for-dynamic-selection.html' title='Bookmarks for Dynamic Selection'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRbXQI-qRP4/TJJ6BvXpJzI/AAAAAAAAC3E/EKZ7ei0WK3M/s72-c/20100906TB_8680_edited-1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-7639971395519637018</id><published>2010-09-01T16:06:00.007-04:00</published><updated>2010-09-03T08:46:53.983-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Listbox or Multibox for Group of Things That Satisfy a Condition</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/TH6zjh_fvEI/AAAAAAAAC1Q/Fbjf8hYsc-o/s1600/speedddd.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5512040416949550146" border="0" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/TH6zjh_fvEI/AAAAAAAAC1Q/Fbjf8hYsc-o/s400/speedddd.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;The expressions that I wrote about in my last blog post can also be used in a &lt;em&gt;listbox&lt;/em&gt; or &lt;em&gt;multibox&lt;/em&gt;. For example, the expression&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=If(aggr(rank(sum(SHIPMENTS)),ITEM)&lt;=15,ITEM,null()) &lt;/span&gt;which lists the 15 top ITEMs by shipment volume, can be put into a listbox where it will look like a regular listbox for the ITEM field except that it will only show the top 15 ITEMs. [in this example the field SHIPMENTS is the number of cases of product shipped and ITEM is the product or material name]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;If you have never used an expression in a listbox before, then go to the listbox properties and open the General tab and scroll up to the very top of the list of fields, there you’ll see the choice for entering an expression.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;One thing different here from the kind of listbox that lists a field is that this listbox with an expression will change as your selections change. For our example, it will list the top 15 frozen items when you have frozen products selected but when you change your selection to coffee products it will list the top 15 coffee items. Another difference is that you cannot change the listbox sort option to sort the list by &lt;em&gt;State&lt;/em&gt; (meaning the state of whether a thing is selected or not) but you can make the listbox sort things by numeric or character value.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;You can set up a multibox with several of these expressions. I have a report with a multibox that has several choices for someone who is interested in finding data problems. Similar to the expressions in the last blog posting, I have &lt;span style="font-family:courier new;font-size:85%;"&gt;=If(sum(SHIPMENTS)&lt;=0,ITEM,null())&lt;/span&gt; that can show me ITEMs with no shipments and &lt;span style="font-family:courier new;font-size:85%;"&gt;=If(sum(SHIPMENTS)&lt;=0 and sum(FORECAST)&gt;0,ITEM,null()) &lt;/span&gt;to show me a list of ITEMs with a sales forecast but no shipments, and &lt;span style="font-family:courier new;font-size:85%;"&gt;=If(sum(PROMOTION)&gt;0,ITEM,null())&lt;/span&gt; to show me a list of ITEMs with special promotional forecasts. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;So, this is another option for you if you or your report users if you regularly have to select a special group of things; the special groups can be defined in a listbox or multibox or as a calculated dimension as explained in the previous blog post. In my next posting I'll describe how to select a group of things that satisfy a condition using a bookmark.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-7639971395519637018?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/7639971395519637018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=7639971395519637018' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7639971395519637018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7639971395519637018'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/09/listbox-or-multibox-for-group-of-things.html' title='Listbox or Multibox for Group of Things That Satisfy a Condition'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/TH6zjh_fvEI/AAAAAAAAC1Q/Fbjf8hYsc-o/s72-c/speedddd.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2086936429463270423</id><published>2010-08-23T15:52:00.013-04:00</published><updated>2010-09-03T08:48:15.711-04: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='chart'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Calculated Dimensions to Show Things Satisfying a Condition</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/THLSqo6eBbI/AAAAAAAAC0k/pw6ESKdQdQI/s1600/beach10.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5508696924206532018" border="0" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/THLSqo6eBbI/AAAAAAAAC0k/pw6ESKdQdQI/s400/beach10.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;We often use a &lt;em&gt;Cycle Group&lt;/em&gt; for the dimension on our charts. That allows the report user to switch between different dimensions easily. I’ve found it useful to add a few extra calculated dimensions that only show a particular group of things – a group that is useful to the report user or a group that requires attention.&lt;br /&gt;For example, I often include a calculated dimension that only shows the top 15 items by shipment volume (it could just as easily be the top fifteen salespersons, or top 15 most requested service kits, or whatever). The expression for a calculated dimension like that is:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=If(aggr(rank(sum(SHIPMENTS)),ITEM)&lt;=15,ITEM,null()) &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;You will need to check off the &lt;em&gt;Suppress When Value Is Null&lt;/em&gt; button on the Dimension tab of the chart properties. If it is important to you for the totals in the chart to remain correct for the entire population then change the code slightly so that the dimension shows the top 15 items and one choice for all other items something like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=If(aggr(rank(sum(SHIPMENTS)),ITEM)&lt;=15,ITEM, 'All Others')&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;With a chart dimension like that the chart changes as the report user changes the selection. When the selection is Country=FRANCE, for example, the chart shows the top 15 items sold in France, and if the selection is Product=CLOTHING then the chart changes to show the 15 clothing items based on shipment volume. If the report user wants to make a selection for the 15 items then that is as simple as dragging the cursor over the 15 items listed in the chart.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;In my job we are always looking for things that adversely affect the quality of sales forecasts. One example of something like that are items on the forecast reports that have no shipments. Unless the item is a very new product it should have shipments. When there’s no shipments for a forecasted item that often is a clue that there is a data problem. A calculated dimension for items with no shipments might look like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=If(sum(SHIPMENTS)&lt;=0,ITEM,null())&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A more specific calculated dimension expression that looks for items with a forecast but no shipments might look like this:&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=If(sum(SHIPMENTS)&lt;=0 and sum(FORECAST)&gt;0,ITEM,null())&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Similar calculated dimensions might look for items with no sales orders or no bill-of-materials or missing pricing data, etc. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;Consider using a calculated dimension when your report users often have to review data for a particular group of things. The calculated dimension may be able to easily isolate a group of things that satisfy a condition even when doing the same task as a selection is complex. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;In my next blog post I'll describe how to show and select a group of things satisfying a condition with a listbox or multibox.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2086936429463270423?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2086936429463270423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2086936429463270423' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2086936429463270423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2086936429463270423'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/08/calculated-dimensions-to-show-things.html' title='Calculated Dimensions to Show Things Satisfying a Condition'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/THLSqo6eBbI/AAAAAAAAC0k/pw6ESKdQdQI/s72-c/beach10.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4855948008749808612</id><published>2010-07-23T11:34:00.007-04:00</published><updated>2010-09-03T08:51:25.804-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='partial reload'/><title type='text'>Export Data From QlikView Table</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_JRbXQI-qRP4/TEm_o-mdEYI/AAAAAAAACjc/LqL0RU0thWk/s1600/surfer.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 286px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5497135530902360450" border="0" alt="" src="http://4.bp.blogspot.com/_JRbXQI-qRP4/TEm_o-mdEYI/AAAAAAAACjc/LqL0RU0thWk/s400/surfer.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;If you have a QlikView document already loaded with data you can export the data from any of the QlikView tables inside the document to a file. The file can either be a comma-delimited text file or a .qvd file.&lt;br /&gt;&lt;br /&gt;From the menu, choose &lt;strong&gt;File-&gt;Edit Script&lt;/strong&gt; to open up the loadscript edit window. Insert a few blank lines at the top of the loadscript. Now, type in a Store command and an Exit Script command. For example, if the table you want to export is named 2009_HISTORY then you might type:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Store 2009_HISTORY into exported_2009_history.txt (txt);&lt;br /&gt;Exit Script;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Don’t save the document with the loadscript changes. It isn’t necessary. Now, from the menu choose &lt;strong&gt;File-&gt;Partial Reload&lt;/strong&gt;. The partial reload will execute the store command and then exit. On a large table this might take a few minutes to write out the file.&lt;br /&gt;&lt;br /&gt;If you wanted to export the data into a QlikView .qvd file then use &lt;em&gt;(qvd)&lt;/em&gt; on that Store command instead of &lt;em&gt;(txt).&lt;/em&gt; Once the file has been exported it is easy to load the qvd file into a different QlikView document.&lt;br /&gt;&lt;br /&gt;If you only wanted to export a few fields from the table then the fields can be specified. For example, to export just a few fields from our example table we could code:&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Store Material, Customer, Invoice_number from 2009_HISTORY into exported_history.txt (txt);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;You can export data to a flat file from a table box, too, of course. But, sometimes, when you have a large table you can't display the entire table in a table box and this partial reload method would be your only option. The other problem with a table box is that it doesn't really display all of the rows from a table; it shows the field values whether they come from a single QlikView table or not. This partial reload method will export data from a single table only.&lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;em&gt;Please check off one of the feedback boxes:&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-4855948008749808612?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4855948008749808612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=4855948008749808612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4855948008749808612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4855948008749808612'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/07/export-data-from-qlikview-table.html' title='Export Data From QlikView Table'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRbXQI-qRP4/TEm_o-mdEYI/AAAAAAAACjc/LqL0RU0thWk/s72-c/surfer.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2583022871984536078</id><published>2010-07-14T18:34:00.008-04:00</published><updated>2010-09-13T12:00:36.565-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Select Top Ten ITEM Values</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_JRbXQI-qRP4/TD49tBfXHgI/AAAAAAAACdg/78WbWy7zJsg/s1600/IMG_4687_12_18.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5493896439141965314" border="0" alt="" src="http://4.bp.blogspot.com/_JRbXQI-qRP4/TD49tBfXHgI/AAAAAAAACdg/78WbWy7zJsg/s400/IMG_4687_12_18.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I've mentioned several times the kind of expression that you can enter into a listbox or multibox to make QlikView do more complex selections than just clicking on values. Those expressions that you begin with an &lt;em&gt;equal sign&lt;/em&gt;, &lt;strong&gt;=&lt;/strong&gt;, are actually &lt;em&gt;advanced search expressions&lt;/em&gt; and they can be very useful. Here's one more that helps answer a question that I get many times:&lt;br /&gt;&lt;br /&gt;If you want to select the top ten or top twenty things based on a specific criteria there is a way to do it. For example, if you have a product identifier named ITEM and you have a sales history quantity named SHist then you can select the top ten ITEM values based on the highest total sales like this - first click on the ITEM listbox to activate it or click the down arrow for ITEM on your multibox. Then start typing this expression: &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=rank(sum(SHist))&lt;=10 &lt;/span&gt;and hit &lt;em&gt;enter&lt;/em&gt; and it will have selected the top ten ITEM values based on sales history. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;I'll have more to say about showing and selecting a group of things that satisfy a condition in my blog postings in August and September.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2583022871984536078?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2583022871984536078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2583022871984536078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2583022871984536078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2583022871984536078'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/07/ive-mentioned-several-times-kind-of.html' title='Select Top Ten ITEM Values'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRbXQI-qRP4/TD49tBfXHgI/AAAAAAAACdg/78WbWy7zJsg/s72-c/IMG_4687_12_18.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3120268333942190732</id><published>2010-07-09T14:20:00.005-04:00</published><updated>2010-09-03T08:52:01.176-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Stepping a Selection Through Each Value of a Field</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_JRbXQI-qRP4/TDdpgKz2zHI/AAAAAAAACb8/BS7qdzds8qA/s1600/20100529TB_pinata_2+copy.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5491974271980194930" border="0" alt="" src="http://4.bp.blogspot.com/_JRbXQI-qRP4/TDdpgKz2zHI/AAAAAAAACb8/BS7qdzds8qA/s400/20100529TB_pinata_2+copy.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Two years ago I posted an entry in this blog describing a macro that would let you step through all of the values of a field. The macro would successively select each value of a field. Shortly after I posted that entry the need for it became obsolete. QlikView has a much better method for stepping through the values of a field and it’s much easier to use than a macro.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Choose a listbox for a field that has the values you want to step through. Select one of the values. Now, just click the &lt;em&gt;Down Arrow&lt;/em&gt; on your keyboard. QlikView moves the selection down to the next value. Every time you press the down arrow the selection moves down to the next value. Try it now – it’s easy! You would use this technique while watching the graphs and charts on your QlikView document and see the changes in the graphs and charts as the selection changes. You can quickly step through dozens of different products, or sales regions, or whatever you’re interested in. When you use this technique to step through date values it becomes a way to animate the charts and show behavior of data over time. The up arrow on your keyboard moves the selection the other way.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is a case where the listbox works better than a multibox. You can click the drop-down arrow for a field on a multibox that contains a selection and then click the down arrow and it will move the selection, but then the list of values closes and you have to click the pull-down arrow again to get it back.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Now, try selecting several values at once on the list box… and then click the down arrow. The group of selections &lt;em&gt;all&lt;/em&gt; move down one value. Now, try pressing the &lt;em&gt;Page Down&lt;/em&gt; key on your keyboard and the group of selections move down several values. If this was a field of dates and you had selected seven dates then pressing Page Down would move down an entire week. The values that you select don’t need to be contiguous values and the technique still works.&lt;br /&gt;Sometimes you might need to lock some of the other selections in order to better control the values that you step through.&lt;/div&gt;★ ★ ★&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;[Please click on one of the feedback boxes below to let me know if you find this kind of information useful. Thanks!]&lt;/em&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3120268333942190732?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3120268333942190732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3120268333942190732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3120268333942190732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3120268333942190732'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/07/stepping-selection-through-each-value.html' title='Stepping a Selection Through Each Value of a 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRbXQI-qRP4/TDdpgKz2zHI/AAAAAAAACb8/BS7qdzds8qA/s72-c/20100529TB_pinata_2+copy.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5603602649870568274</id><published>2010-07-06T13:56:00.009-04:00</published><updated>2010-10-04T09:58:04.240-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trigger'/><title type='text'>Fire a Trigger When User Changes an Input Field</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/TDNu-8AF-iI/AAAAAAAACak/63kvgQu_1aA/s1600/20100704TB_5430_edited-1.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 217px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5490854398232230434" border="0" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/TDNu-8AF-iI/AAAAAAAACak/63kvgQu_1aA/s400/20100704TB_5430_edited-1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Prior to the introduction of &lt;em&gt;Input Fields&lt;/em&gt; there was no need for a trigger that would fire when loaded data changes. Because the only way that data could change was to reload it. But, when the QlikView document uses input fields then some of the data can be changed by the report user. The input fields feature allows data to be changed in list boxes, table boxes and some charts and can be very useful.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;I helped advise a project that needed to know when data was changed by the report user because they had to apply custom logic for splitting the change from a summary level to detailed level. The solution was to use a variable containing an expression that looked something like this &lt;span style="font-family:courier new;"&gt;&lt;strong&gt;=Sum(sales_forecast)&lt;/strong&gt;&lt;/span&gt; Then, a trigger was defined that would fire when the value of the variable changes. QlikView would evaluate the expression when the data changed and the trigger would fire causing a macro to execute which did the customized data split.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;That solution worked well with QlikView 9.0 SR2 but when SR3 was installed on the computer then the trigger no longer fired. Without that trigger there is no way to run a macro when the data changes &lt;em&gt;(if anyone knows of another way to fire the trigger when input field data changes please leave a comment below).&lt;/em&gt; The project is currently using 9.0 SR2 and everything works fine but they cannot upgrade to a later release unless this issue is solved for later releases.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;em&gt;&lt;span style="font-size:130%;"&gt;[October 4, 2010 Note:  The problem seems to be fixed in version 9.0 SR 6]&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5603602649870568274?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5603602649870568274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5603602649870568274' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5603602649870568274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5603602649870568274'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/07/fire-trigger-when-user-changes-input.html' title='Fire a Trigger When User Changes an Input 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/TDNu-8AF-iI/AAAAAAAACak/63kvgQu_1aA/s72-c/20100704TB_5430_edited-1.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-7926581238675211205</id><published>2010-06-27T21:18:00.007-04:00</published><updated>2010-09-03T08:53:16.204-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Activate Multiple Listboxes</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCf9NKP54RI/AAAAAAAACZE/5QUpdMQk1oI/s1600/20100507TB_2956_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5487633073505427730" border="0" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCf9NKP54RI/AAAAAAAACZE/5QUpdMQk1oI/s400/20100507TB_2956_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;When I'm teaching new users about QlikView I always demonstrate how you can click on a &lt;em&gt;listbox&lt;/em&gt; to activate it and then start typing a few characters and the values of that field containing those characters are displayed and can be easily selected. I also show them how if you start typing an expression like &lt;span style="font-family:courier new;"&gt;=Sum(Sales)&gt;10000&lt;/span&gt; it can help display and select products (or regions or salespersons or whatever) with sales greater than 10,000.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Clicking on the particular listbox to activate it is a simple but important part of the process. It is possible to activate more than one listbox at a time. And, if you do that, and start typing characters then QlikView will display the values containing those characters for all of the active listbox objects. You might not be able to hit enter and do the selections for all of the listbox fields at once because they will often interfere with each other.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The way you would activate several listbox objects at once is to click your mouse on the screen and holding the mouse button drag a "box" around the objects you want to activate. Or, you can activate all objects on the screen by pressing &lt;em&gt;Ctrl-A&lt;/em&gt;. This feature may be useful when you are selecting multiple field values to match how they are selected in a document bookmark without implementing the entire bookmark (see the previous blog posting from June 15).&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-7926581238675211205?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/7926581238675211205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=7926581238675211205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7926581238675211205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7926581238675211205'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/06/activate-multiple-listboxes.html' title='Activate Multiple Listboxes'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/TCf9NKP54RI/AAAAAAAACZE/5QUpdMQk1oI/s72-c/20100507TB_2956_edited-1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5097519045625035257</id><published>2010-06-15T17:05:00.009-04:00</published><updated>2010-09-03T08:54:27.096-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Restoring the selection for a single field from a bookmark</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpHOfRJQYI/AAAAAAAACaU/mnuJcgoDNPw/s1600/morning_at_the_old_barn.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5488277410141520258" border="0" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpHOfRJQYI/AAAAAAAACaU/mnuJcgoDNPw/s400/morning_at_the_old_barn.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;When you create a QlikView Bookmark to save your current selections it saves all of the selections for all of the fields where you’ve made a selection in your document. Often, that’s the reason you’re saving the selections as a bookmark – because it’s a complex set of selections for several fields that would take a while to recreate the next time you need them.&lt;br /&gt;&lt;br /&gt;Sometimes, it would be nice to restore the selection from a bookmark for just one field. For example, if you have a bookmark named &lt;em&gt;Project_3&lt;/em&gt; that was used to save a complex selection from your monthly sales report, you might want to use only the part of that bookmark that is a selection on the &lt;em&gt;Ship_Date&lt;/em&gt; field.&lt;br /&gt;&lt;br /&gt;The way you would do that is to click on a &lt;em&gt;listbox&lt;/em&gt; in your document for the Ship_Date field or click on the Ship_Date row in a &lt;em&gt;multibox&lt;/em&gt; to activate the object. Then, start typing, make sure you begin typing with an equal sign (so that QlikView knows that you are beginning to type an expression). Type this: &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=sum( { Project_3 } 1 ) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That expression when typed into the selection box for Ship_Date will select only the Ship_Date values that are saved within the Project_3 bookmark. An expression like that can also be used with the Advanced Selection dialog box.&lt;br /&gt;&lt;br /&gt;Remember that bookmarks can be exported and imported into other documents. You can even import bookmarks into documents quite different from the original document where the bookmark was created; when you do that the bookmark selections will be applied only to the fields named exactly the same as in the original document.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5097519045625035257?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5097519045625035257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5097519045625035257' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5097519045625035257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5097519045625035257'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/06/restoring-selection-for-single-field.html' title='Restoring the selection for a single field from a bookmark'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpHOfRJQYI/AAAAAAAACaU/mnuJcgoDNPw/s72-c/morning_at_the_old_barn.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3162219366927778223</id><published>2010-06-11T13:15:00.011-04:00</published><updated>2010-09-03T08:54:56.510-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>User Option done as a Field Selection</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpH2Tl54WI/AAAAAAAACac/kc8Mw_LIxXQ/s1600/a+ride+in+the+car.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5488278094202134882" border="0" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpH2Tl54WI/AAAAAAAACac/kc8Mw_LIxXQ/s400/a+ride+in+the+car.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;I’ve prepared a number of reports where the person who opens the report must make a choice about something that affects the report functionality or something that affects the way the report objects look. There are several ways to approach that issue when you design a report. Here’s an example from a recent report I designed.&lt;br /&gt;&lt;br /&gt;The report had a chart in it that could show data by various units of measure or “UOM”. The unit of measure could be &lt;em&gt;Cases&lt;/em&gt; or &lt;em&gt;Eaches&lt;/em&gt; or &lt;em&gt;Dollars&lt;/em&gt; and the chart object expressions would handle the conversions. We decided that we’d like the user to be able to change the UOM selection in a Multi-box on the tab so that the user could make all of her selections in one place. UOM doesn’t actually appear in the data being loaded so I had to put a little in-line table into the loadscript that defined the three values. It looked like this: &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;UOM_SELECTION:&lt;br /&gt;Load * Inline&lt;br /&gt;[UOM&lt;br /&gt;Cases&lt;br /&gt;Eaches&lt;br /&gt;Dollars]; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then I loaded a new set of data into the report. Now, I could add the UOM field to the multi-box and the user could treat it the same as any other selection.&lt;br /&gt;&lt;br /&gt;The Multi-box object has a feature on the Presentation tab that works well with this kind of field. If you first select one of the values of the field you can open up the Multi-box &lt;em&gt;Properties&lt;/em&gt; dialog and choose the &lt;em&gt;Presentation&lt;/em&gt; tab and click the &lt;em&gt;Always One Selected Value&lt;/em&gt; check box (If you don’t first select a single value then the checkbox will be grayed out). This helps the user avoid making a mistake with the UOM selection – the user is prevented from clearing the selection in that field and prevented from selecting more than one value. Since the UOM field selection is only for one value, an expression in the chart can refer to it simply by name; for example, the expression might say &lt;span style="font-family:courier new;"&gt;If(UOM='Dollars',sum(sales)*unit_cost)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I made two other changes to the chart just to make sure that there would be no confusion about the UOM value:&lt;br /&gt;I opened the Chart Properties dialog for the chart selected the General tab and put this expression into the &lt;em&gt;Calculation Condition&lt;/em&gt;: &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=if(count(distinct UOM)=1, 1, 0) &lt;/span&gt;&lt;br /&gt;That will check to make sure that one and only one value of UOM is selected otherwise the chart will show an error message. Then I modified the error message text from the default value of “Calculation condition unfulfilled” to a more useful message that said “Please select a single UOM value to see this chart”.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3162219366927778223?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3162219366927778223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3162219366927778223' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3162219366927778223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3162219366927778223'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/06/user-option-done-as-field-selection.html' title='User Option done as a Field Selection'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpH2Tl54WI/AAAAAAAACac/kc8Mw_LIxXQ/s72-c/a+ride+in+the+car.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-7057489442223278950</id><published>2010-06-02T20:19:00.008-04:00</published><updated>2010-09-03T08:56:43.677-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Combining Bookmarks</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpE2ubEeGI/AAAAAAAACZk/rok5meU-ufk/s1600/familiar_trees.jpg"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 128px; FLOAT: left; HEIGHT: 85px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5488274802869565538" border="0" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpE2ubEeGI/AAAAAAAACZk/rok5meU-ufk/s400/familiar_trees.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I was called to help with a situation last week where one person, working on a pricing project, had analyzed some data and identified a group of &lt;em&gt;materials&lt;/em&gt; that would be needed later. The materials were selected and a bookmark was defined.&lt;br /&gt;&lt;br /&gt;There was a second person working on a seemingly unrelated marketing project, who also identified a group of materials, selected them, and defined a bookmark for the selection.&lt;br /&gt;The problem was that there was a need to combine the materials selections from the two separate bookmarks. There’s no good way to really combine two entire bookmarks and create a third bookmark out of them. But, when you’re interested in the selections for a single field as the people in my example were interested in the materials field, then there is a technique for combining the selections.&lt;br /&gt;&lt;br /&gt;To illustrate the technique, assume that the first bookmark is named B&lt;em&gt;K1&lt;/em&gt; and the second bookmark is named &lt;em&gt;BK2&lt;/em&gt;. First, get both of the bookmarks into the same document. An easy way to do that is export the bookmarks from the documents where they were created and then import one or both of them into a second document. In the document containing both bookmarks you will need a &lt;em&gt;listbox&lt;/em&gt; for the materials field or a &lt;em&gt;multibox&lt;/em&gt; that contains the materials field.&lt;br /&gt;Click on the materials listbox or on the little black triangle next to the materials on the multibox. Then, begin to type this expression:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=sum( { BK1 + BK2 } 1 ) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As soon as you type the equal sign, QlikView knows that you are entering an expression. It looks like an expression you might use in a chart but we’re going to use it here to select materials. The syntax is a &lt;em&gt;set analysis&lt;/em&gt; expression – it can be a little tricky with the parentheses and curly braces but it is worth the trouble when you need it. As you type the expression a number of materials will be listed with a white background – those represent a combination of all of the materials from both of the bookmarks. Finish the expression by hitting the Enter key and the materials are now selected and show up with a green background.&lt;br /&gt;&lt;br /&gt;A similar expression could be used to combine the materials from a bookmark with the currently selected materials in a document. For that you would follow the instructions as above but type this expression:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=sum( { $ + BK1 } 1 ) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you wanted to select only the materials that appears in both bookmarks (the intersection), then type this expression:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=sum( { BK1 * BK2 } 1 ) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And, finally, if you wanted to select the materials that are both in your current selection and in the bookmark then type this expression:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;=sum( { $ * BK1 } 1 ) &lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-7057489442223278950?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/7057489442223278950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=7057489442223278950' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7057489442223278950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7057489442223278950'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/06/combining-bookmarks.html' title='Combining Bookmarks'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/TCpE2ubEeGI/AAAAAAAACZk/rok5meU-ufk/s72-c/familiar_trees.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5678546668344436342</id><published>2010-06-01T22:15:00.005-04:00</published><updated>2010-09-03T08:57:31.419-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='copy chart'/><category scheme='http://www.blogger.com/atom/ns#' term='sheet object'/><title type='text'>The Case of the Disappearing Object</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/TCpFka_bx2I/AAAAAAAACZ0/2DuRBqb0u2k/s1600/20100507TB_2904_edited-1.JPG"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5488275587927361378" border="0" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/TCpFka_bx2I/AAAAAAAACZ0/2DuRBqb0u2k/s400/20100507TB_2904_edited-1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;A few weeks ago my co-worker Kim called me about a problem she was having copying a chart from one report to another. Copying any QlikView sheet object from tab to tab or report to report is very easy but she was having a problem pasting the object into a new report. There was no error message but it was obvious that the chart was not being pasted successfully.&lt;br /&gt;We discussed the possibilities and I focused on security setting issues but, by the end of the call, nothing had worked.&lt;br /&gt;&lt;br /&gt;Two hours later, Kim called me back – she had figured it out and, like many good problem solutions, it seemed so obvious in hindsight. The problem was that the object had a &lt;em&gt;Show Condition&lt;/em&gt; defined that would make the object visible only under a specific data condition. The data in the new report was different and the condition was not satisfied. So, the object was behaving as the Show Condition directed and it was simply not visible in the new report. Now, I know to be conscious of the Show Condition when copying an object.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;★ ★ ★ &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5678546668344436342?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5678546668344436342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5678546668344436342' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5678546668344436342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5678546668344436342'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2010/06/case-of-disappearing-object.html' title='The Case of the Disappearing Object'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/TCpFka_bx2I/AAAAAAAACZ0/2DuRBqb0u2k/s72-c/20100507TB_2904_edited-1.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-320960520773412374</id><published>2009-06-18T15:58:00.005-04:00</published><updated>2009-06-23T16:54:39.965-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Load from Excel even if you don't know the tab name</title><content type='html'>Several months ago a reader asked if there was any way for a QlikView document to know the names of the tabs or sheets within an Excel spreadsheet without using VBA or macro code. Well, I still don't know the answer to that question. But, there is a way for a loadscript to load data from an Excel spreadsheet without knowing the tab or sheet name -- it just loads from the "first" or leftmost tab if you don't specify the table parameter.&lt;br /&gt;&lt;br /&gt;For example, these lines in your loadscript will load from the first tab of an Excel spreadsheet named aaadata.xls:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;XLTBL:&lt;br /&gt;LOAD *&lt;br /&gt;FROM [aaadata.xls] (biff, embedded labels); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When I have time I'll see if I can combine that with a macro that does a browse-for-file dialog and also automatically builds a table-box object and then we'll have a general purpose QlikView document that loads almost any spreadsheet in a useful way.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Make sure to read the comment from Rob Wunderlich. Thanks, Rob!&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-320960520773412374?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/320960520773412374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=320960520773412374' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/320960520773412374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/320960520773412374'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/06/load-from-excel-even-if-you-dont-know.html' title='Load from Excel even if you don&apos;t know the tab name'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1720312855924085368</id><published>2009-06-17T16:23:00.002-04:00</published><updated>2009-06-17T16:28:37.225-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Test if QlikView table exists within the loadscript</title><content type='html'>Sometimes, within the loadscript, I need to check if a QlikView table exists or not. Most often this is done after bringing in a separate QlikView document's data with a BINARY statement and I don't know exactly which tables are included in the older document. Sometimes I just need to check if a QlikView table was successfully created earlier in the loadscript.&lt;br /&gt;&lt;br /&gt;Here's the way I do it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Let RowCount = NoOfRows('TABLE_1');&lt;br /&gt;If '$(RowCount)' = '' then&lt;br /&gt;&amp;nbsp;&amp;nbsp;//Put statements here to be&lt;br /&gt;&amp;nbsp;&amp;nbsp;//used if TABLE_1 does not exist&lt;br /&gt;&lt;br /&gt;Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;//Put statements here to be&lt;br /&gt;&amp;nbsp;&amp;nbsp;//used if TABLE_1 exists&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;There are probably better ways to check to see if a QlikView table already exists. If you know another way to check on QlikView tables using loadscript code, please leave a comment. Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1720312855924085368?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1720312855924085368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1720312855924085368' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1720312855924085368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1720312855924085368'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/06/test-if-qlikview-table-exists-within.html' title='Test if QlikView table exists within 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1914935021103718525</id><published>2009-06-16T11:05:00.005-04:00</published><updated>2009-06-16T11:20:59.265-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Set analysis and chart dimension</title><content type='html'>Using &lt;em&gt;set analysis&lt;/em&gt; syntax in a chart expression can be useful but remember that set analysis is based on the concept of selection -- it still must work within the dimension of the chart.&lt;br /&gt;For example, if you have a document where HFcst and Lag are two fields, you might have a chart expression that looks like this:&lt;br /&gt;&lt;strong&gt;Sum&amp;#40;&amp;#123;$&amp;#60;Lag=&amp;#123;2&amp;#125;&amp;#62;&amp;#125; HFcst)&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;That expression is a sum of HFcst with the set analysis syntax working like a selection override specifying that within the Sum function it should use the selection of &lt;em&gt;Lag=2&lt;/em&gt;. You couldn't use that expression in a chart where Lag was one of the dimensions and have it work the way you might expect because the expression still must respect the dimensions of the chart -- each row of the chart must match a particular dimension value. But, as long as Lag is not used as the chart dimension then the expression could be very useful (perhaps as a comparison to the current Lag selection).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1914935021103718525?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1914935021103718525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1914935021103718525' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1914935021103718525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1914935021103718525'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/06/set-analysis-and-chart-dimension.html' title='Set analysis and chart dimension'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6143328158374279693</id><published>2009-06-14T18:26:00.002-04:00</published><updated>2009-06-14T18:31:54.795-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Quick load of max field value</title><content type='html'>Sometimes, after loading a big table from several different sources I need to find the largest value of a field, or the smallest, or the average, etc. If the name of the big table is BIGTABLE and the field where I want to find the largest value is FDate then I could do something like this in the loadscript:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MAX_FDATE:&lt;br /&gt;Load Max(FDate) resident BIGTABLE;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Depending on the size of BIGTABLE that could take a long time. There's a faster way - the first step is to build a table that contains all of the values of FDate. That looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ALL_FDATE:&lt;br /&gt;Load FieldValue('FDate',IterNo()) as FDate&lt;br /&gt;AutoGenerate(1)&lt;br /&gt;While not Isnull(FieldValue('FDate',IterNo()));&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That will load all of the existing distinct values of FDate almost instantaneously. It really is all of the values of FDate from all tables loaded up to that point in the loadscript and not just BIGTABLE so be aware of that if you use this method.&lt;br /&gt;The second step is just to load the max FDate from our smaller ALL_FDATE table which should run much faster than loading from the resident BIG_TABLE:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MAX_FDATE:&lt;br /&gt;Load Max(FDate) resident ALL_FDATE;&lt;br /&gt;Drop table ALL_FDATE; //no longer needed&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6143328158374279693?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6143328158374279693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6143328158374279693' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6143328158374279693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6143328158374279693'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/06/quick-load-of-max-field-value.html' title='Quick load of max field value'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6465644918788590706</id><published>2009-03-14T11:33:00.004-04:00</published><updated>2009-03-14T13:05:35.292-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Browse-for-File Macro Button</title><content type='html'>Several times I’ve created QlikView reports that must read data from a file but the name of the file can vary and must be supplied by the report user. Often this is a file that will be used by the loadscript so the user first clicks a macro button that runs a &lt;em&gt;browse-for-file dialog&lt;/em&gt; and then the user clicks the standard &lt;strong&gt;Reload&lt;/strong&gt; button.&lt;br /&gt;&lt;br /&gt;Here’s an example of a macro that borrows the browse file dialog method from the Microsoft Excel object model. This macro should work on any PC that has MS Excel installed (it does not actually start Excel). You can copy the code from here and paste it into your QlikView report module code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Sub Browse_for_File&lt;br /&gt;'------------------&lt;br /&gt;' Get the file pathname&lt;br /&gt;Set oXL=CreateObject("Excel.Application")&lt;br /&gt;f_name=oXL.GetOpenFilename("All Files (*.*),*.*",,"Select file",False)&lt;br /&gt;If f_name="False" then&lt;br /&gt;&amp;nbsp;&amp;nbsp;'user cancelled out of dialog box&lt;br /&gt;&amp;nbsp;&amp;nbsp;Set oXL=nothing&lt;br /&gt;&amp;nbsp;&amp;nbsp;Exit sub&lt;br /&gt;End If&lt;br /&gt;'store file pathname in the file_pathname variable&lt;br /&gt;ret=ActiveDocument.GetVariable("file_pathname").SetContent(f_name,false)&lt;br /&gt;Set oXL=nothing&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This macro stores the file pathname for the file selected by the report user into a document variable named &lt;em&gt;file_pathname&lt;/em&gt; (create the new document variable before running the macro). When I create a report that uses this macro I usually also put an input box in the report that shows the file pathname stored in the variable and allows the user an alternative method for specifying the pathname.&lt;br /&gt;&lt;br /&gt;A QlikView document example of this technique, named &lt;em&gt;BIG_Text_File.qvw&lt;/em&gt;, is available here – &lt;a href="http://finmagic.0catch.com/"&gt;&lt;i&gt;http://finmagic.0catch.com/&lt;/i&gt;&lt;/a&gt; Sorry about the ads and popups – just click on the specific file download.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6465644918788590706?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6465644918788590706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6465644918788590706' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6465644918788590706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6465644918788590706'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/03/browse-for-file-macro-button.html' title='Browse-for-File Macro Button'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-8143761374110815541</id><published>2009-03-09T16:41:00.002-04:00</published><updated>2009-03-09T16:48:26.089-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Finding Missing Dates With a Chart</title><content type='html'>Yesterday I was reviewing a report of sales and shipment data for 2007 and 2008. The data was very detailed with order numbers and quantities and shipdates. I wanted to know if any shipdates were missing (dates for which no shipping occurred) or if there were really shipments for every day in 2007 and 2008. This is how I looked for any missing dates:&lt;br /&gt;&lt;br /&gt;I created a straight table chart with SHIPDATE as the dimension. I created two expressions. One expression, labeled &lt;em&gt;Missing Date,&lt;/em&gt; looked like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If(Not IsNull(Above(SHIPDATE)),If(SHIPDATE-Above(SHIPDATE)&lt;&gt;1,Date(Above(SHIPDATE)+1)))&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;And the other expression, labeled &lt;em&gt;Missing Date Count,&lt;/em&gt; looked like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If(Not IsNull(Above(SHIPDATE)),If(SHIPDATE-Above(SHIPDATE)&lt;&gt;1,(SHIPDATE-Above(SHIPDATE))-1))&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The Chart &lt;em&gt;Above()&lt;/em&gt; function lets the expression look at a value from the row above. Since the chart is sorted by SHIPDATE, the SHIPDATE value in the current row should be one day greater than the row above. If it isn’t then there is at least one missing date. The check on &lt;em&gt;IsNull&lt;/em&gt; is required because there is no row above for the first row on the chart.&lt;br /&gt;&lt;br /&gt;The chart worked ok. I tried it out on a sample of the data where I had intentionally excluded two dates from loading in the loadscript and it worked fine.&lt;br /&gt;The total line for the &lt;em&gt;Missing Date Count&lt;/em&gt; tells me if there are any missing dates. With this method, though, you have to scroll through down through the chart to find the specific missing dates. You can’t sort the chart to bring missing dates to the top because that would interfere with the &lt;em&gt;Above()&lt;/em&gt; function in the expression (I disabled the interactive sort capability for this chart to make sure nobody tried changing the sorted order). The other drawback is that a gap of several consecutive missing dates only shows the one missing date that begins the gap (the &lt;em&gt;Missing Date Count&lt;/em&gt; though shows a count of how many dates are missing in that gap).&lt;br /&gt;&lt;br /&gt;This expression works in a chart with more dimensions too. For example, the dimensions might be ship-to-country and shipdate. Then the chart would show missing shipping dates (or dates where no shipping occurred) by ship-to-country. It only makes sense though to look for missing shipping dates within data where there is an assumption about shipping every day or every week day in order that your assumptions are tested versus the data.&lt;br /&gt;&lt;br /&gt;I know that there are methods that could be used in the loadscript to look for missing dates and there are sql queries that can look for missing members of a sequence in the database. But, if anyone knows of a better method for finding missing dates using only QlikView sheet objects I’d be interested to know how.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-8143761374110815541?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/8143761374110815541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=8143761374110815541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8143761374110815541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8143761374110815541'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/03/finding-missing-dates-with-chart.html' title='Finding Missing Dates With a Chart'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-264320500059916386</id><published>2009-03-08T12:19:00.009-04:00</published><updated>2009-03-14T11:46:49.057-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Using QlikView to Look at a Big Text File</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/SbPwXELh-bI/AAAAAAAAAGA/3EHk50lB5Uc/s1600-h/QM_blog_17.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5310852664649710002" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 210px" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/SbPwXELh-bI/AAAAAAAAAGA/3EHk50lB5Uc/s320/QM_blog_17.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;This week I was loading data from a very large text file into a database and had some problems with some of the records. I needed to look at the group of records in the file that was causing the problem but the file was big, over 12 million records, too big for Notepad or Wordpad. I decided to load it into QlikView – not the most elegant use for QlikView but setting it up was fast and it worked out better than I hoped.&lt;br /&gt;&lt;br /&gt;I put these lines into the loadscript:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;BIGFILE:&lt;br /&gt;Load RecNo() as recordno,&lt;br /&gt;Len(@1) as recordlen,&lt;br /&gt;@1 as RECORD&lt;br /&gt;FROM E:\Data\bigtextfile.dat (ansi, txt, delimiter is '`', no labels)&lt;br /&gt;where RecNo()&lt;1000000;&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;That &lt;em&gt;RecNo()&lt;/em&gt; function in the &lt;em&gt;Where&lt;/em&gt; clause limited the load to the first million records. I tried loading all 12 million rows but on my laptop with 2GB of memory the loaded report was pretty sluggish. I defined the backtick character as a delimiter even though it doesn’t appear in the data so I could load the entire record by calling it field &lt;em&gt;@1&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;The main tab on the report itself was a table box for all three fields and list boxes for each of the three fields. Selecting by recordno let me look at specific sections of the file. The list box for RECORD was very useful – all I had to do was type a few characters of the data I was looking for and hit the Enter key to select it and QlikView quickly showed me what I needed from the file.&lt;br /&gt;&lt;br /&gt;It worked so well that I added a browse-for-the-file macro and changed the load statement to use variables that are defined with input boxes on the report to make it a useful, general purpose report for whenever I need to examine a text file. An example of this document, named &lt;em&gt;BIG_Text_File.qvw&lt;/em&gt;, is available here – &lt;a href="http://finmagic.0catch.com/"&gt;&lt;i&gt;http://finmagic.0catch.com/&lt;/i&gt;&lt;/a&gt; Sorry about the ads and popups – just click on the specific file download.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-264320500059916386?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/264320500059916386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=264320500059916386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/264320500059916386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/264320500059916386'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/03/using-qlikview-to-look-at-big-text-file_08.html' title='Using QlikView to Look at a Big 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/SbPwXELh-bI/AAAAAAAAAGA/3EHk50lB5Uc/s72-c/QM_blog_17.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1200178052767213517</id><published>2009-02-22T08:51:00.008-05:00</published><updated>2009-02-22T12:18:54.607-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Report Tells User ABOUT The Data</title><content type='html'>&lt;p&gt;Last week a coworker, who was working on a report to validate some data sent to us by a client, asked me how to highlight null values in a chart in the report. I showed her how to do that (&lt;a href="http://qlikviewmaven.blogspot.com/2009/02/highlighting-chart-value.html" target="Highlight Chart Value"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;). And I offered another suggestion: you don’t want your report user to have to scroll through a lot of data or have to sort the chart to find out if any null values exist; it will help the report user if you provide a text box that tells right away if any nulls or zeros or whatever other interesting conditions exist in the data. Then, the report user can decide how to use the other objects on the report to analyze the data.&lt;br /&gt;&lt;br /&gt;This report was a data validation report but the idea can be used for executive summaries and other kinds of reports. The goal is to have a text object that uses easy-to-understand language to tell the report user about important aspects of the data. The idea is similar to the discussion of putting counts in a chart title from a few months ago (&lt;a href="http://qlikviewmaven.blogspot.com/2008/11/putting-count-in-chart-title.html" target="Count in Chart Title"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;). When you design a text object like this you should ask yourself: &lt;em&gt;“what things will the report user be looking for in this report?”&lt;/em&gt; and &lt;em&gt;“what questions will the report user be asking of the data?”&lt;/em&gt; The text box is telling the report user important things &lt;strong&gt;&lt;em&gt;About&lt;/em&gt;&lt;/strong&gt; the data not just summarizing the data.&lt;br /&gt;&lt;br /&gt;Here’s what we tried out in the text box of a draft version of that report:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;='Current Selection Data Issues:&lt;br /&gt;'&amp;amp;&lt;br /&gt;If(sum(If(Len(Trim(product))=0,1,0))&gt;0,'Data contains null product values.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(Len(Trim(ship_loc))=0,1,0))&gt;0,'Data contains null ship_loc values.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(Len(Trim(mkt_channel))=0,1,0))&gt;0,'Data contains null mkt_channel values.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(Len(Trim(ship_loc))&gt;0 and Len(Trim(ship_loc))&lt;&gt;4,1,0))&gt;0,'Data contains wrong length (not 4) ship_loc values.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(qty&lt;0,1,0))&gt;0,'Data contains negative qty.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(qty=0,1,0))&gt;0,'Data contains zero qty.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(qty&lt;&gt;floor(qty),1,0))&gt;0,'Data contains fractional qty.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(Len(Trim(qty))=0,1,0))&gt;0,'Data contains null or blank qty.&lt;br /&gt;')&amp;amp;&lt;br /&gt;If(sum(If(qty&gt;100000,1,0))&gt;0,'Data contains unusually large qty.')&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That text expression only shows the messages if the data conditions actually exist. If some important data condition can only be detected during during data loading then consider capturing the important condition in a document variable while the loadscript is running and then use the document variable in the text box.&lt;/p&gt;&lt;p&gt;We also added this little text box of various counts:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;='Current Selection Contains:&lt;br /&gt;'&amp;amp;Num(Count(Distinct product),'###,###')&amp;amp;' products&lt;br /&gt;'&amp;amp;Num(Count(Distinct ship_loc),'###,###')&amp;amp;' ship_loc&lt;br /&gt;'&amp;amp;Num(Count(Distinct mkt_channel),'###,###')&amp;amp;' mkt_channels&lt;br /&gt;'&amp;amp;Num(Count(Distinct product&amp;amp;'.'&amp;amp;ship_loc&amp;amp;'.'&amp;amp;mkt_channel),'###,###')&amp;amp;' SKUs (product/ship_loc/mkt_channel)&lt;br /&gt;'&amp;amp;Num(Count(Distinct orderid),'###,###')&amp;amp;' orders&lt;br /&gt;'&amp;amp;Num(Count(Distinct shipdate),'###,###')&amp;amp;' shipdates, '&amp;amp;min(shipdate)&amp;amp;' to '&amp;amp;max(shipdate)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The data issues text box could also have been written to show counts of the various issues.&lt;br /&gt;&lt;br /&gt;Another interesting way to use text expressions like that is in a straight table chart. You can set up the chart with a dimension like shipping-location and put the text expression (minus that first line which is a title) in the chart expressions and then you have a chart that uses easy-to-understand language to tell about data conditions for each shipping-location.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1200178052767213517?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1200178052767213517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1200178052767213517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1200178052767213517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1200178052767213517'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/02/report-tells-user-about-data.html' title='Report Tells User ABOUT The Data'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5895608292534562722</id><published>2009-02-21T10:16:00.005-05:00</published><updated>2009-02-21T10:36:48.013-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Highlighting a Chart Value</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/SaAb7-PfIfI/AAAAAAAAAFo/Qc5yesXmaJk/s1600-h/QM_blog_16.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5305271078176629234" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 182px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/SaAb7-PfIfI/AAAAAAAAAFo/Qc5yesXmaJk/s400/QM_blog_16.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I was asked, “How do you highlight a null value in a straight-table chart?” If you want to set the background color or text color based on a range of expression values then the &lt;em&gt;Chart Properties-&gt;Visual Cues&lt;/em&gt; is the way to go. But the Visual Cues tab doesn’t work well for null values and it won’t help if you want to highlight the value based on anything more than a simple test of values. For that, you want to use a separate, special expression to set the background color or text color.&lt;br /&gt;&lt;br /&gt;Right-click on the chart and select &lt;em&gt;Properties&lt;/em&gt; and go to the &lt;em&gt;Expressions&lt;/em&gt; tab. Click on the little plus sign ( + ) to the left of the expression you want to highlight. See the example in the picture above. In the example, the expression is named &lt;em&gt;Shipments &lt;/em&gt;and I have clicked on the &lt;em&gt;Background Color&lt;/em&gt; choice and entered this expression into the box:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;If(IsNull(Shipments),LightRed())&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That expression tells the chart to use the LightRed color as a background color when the Shipments value is null. There are other colors you could use – search on &lt;em&gt;color functions&lt;/em&gt; in the Help text to find information about other colors. Background color works well to highlight values in a straight table chart but it won't help with line graphs or bar charts. The expression can include other factors like the source of the data or the value in the chart dimension or the average monthly sales volume for 2008; use whatever factors that provide a reason for pointing out that particular expression value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5895608292534562722?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5895608292534562722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5895608292534562722' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5895608292534562722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5895608292534562722'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/02/highlighting-chart-value.html' title='Highlighting a Chart Value'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/SaAb7-PfIfI/AAAAAAAAAFo/Qc5yesXmaJk/s72-c/QM_blog_16.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1864599811902268995</id><published>2009-02-12T17:53:00.008-05:00</published><updated>2009-02-17T15:39:45.366-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Capture Variable Values in the Loadscript</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SZSrRGKfd9I/AAAAAAAAAFg/iJhbzb9D2KU/s1600-h/QM_blog_15.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5302050971522660306" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 194px; CURSOR: hand; HEIGHT: 200px" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SZSrRGKfd9I/AAAAAAAAAFg/iJhbzb9D2KU/s200/QM_blog_15.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I often put statements in the loadscript that record current conditions as document variables in case the information might be useful someday when checking into a problem or simply to document the origin of the data. Here’s a few that have proved useful:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;let reload_time = now();&lt;br /&gt;let user = OSuser();&lt;br /&gt;let computer = ComputerName();&lt;br /&gt;If IsPartialReload() then&lt;br /&gt;&amp;nbsp&amp;nbsp let partial_reload_time = now();&lt;br /&gt;Else&lt;br /&gt;&amp;nbsp&amp;nbsp let partial_reload_time = '';&lt;br /&gt;End If&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Those variables can be displayed on the title tab or in a corner of the main tab.&lt;br /&gt;&lt;br /&gt;You can capture information from the data that is being loaded and store it in a variable. This is useful for control information that would be displayed on the title page like the system information above. It can also be useful to control &lt;em&gt;If &lt;/em&gt;statements and &lt;em&gt;Loops&lt;/em&gt; and &lt;em&gt;Where&lt;/em&gt; clauses in the loadscript.&lt;br /&gt;&lt;br /&gt;Here’s an example that reads a date from an Oracle table and stores it in a QlikView document variable so it can be displayed in a chart title:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;//Find OHPOST date and store in a one-row table&lt;br /&gt;DUNK_OHPOST:&lt;br /&gt;SELECT TO_CHAR(MAX(OHPOST),'MM/DD/YYYY') AS DUNK_OHPOST FROM SKU;&lt;br /&gt;&lt;br /&gt;//Now, put the value into a document variable&lt;br /&gt;Let DUNK_OHPOST=Date(Peek('DUNK_OHPOST',0,'DUNK_OHPOST'));&lt;br /&gt;Drop table DUNK_OHPOST;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:georgia;"&gt;That &lt;em&gt;Peek&lt;/em&gt; function takes 3 arguments: fieldname, row number, and table name. For a one-row table use zero to indicate the first row. If that is a unique field name then you could also use the &lt;em&gt;FieldValue&lt;/em&gt; function to retrieve the value from the first field value.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:georgia;"&gt;In older QlikView versions you could use the Peek function in a text object but that isn't allowed any longer. So, store the values in document variables and you can display them in text object or chart titles. Consider displaying data values that tell the report user something important &lt;u&gt;&lt;em&gt;about&lt;/em&gt;&lt;/u&gt; the data; such as earliest or latest posting dates, high or low order numbers, current fiscal period, currency conversion factor, source application version number, security or classification warning, etc.&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1864599811902268995?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1864599811902268995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1864599811902268995' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1864599811902268995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1864599811902268995'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/02/capture-variable-values-in-loadscript.html' title='Capture Variable Values 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/SZSrRGKfd9I/AAAAAAAAAFg/iJhbzb9D2KU/s72-c/QM_blog_15.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2100813049336884824</id><published>2009-02-11T14:57:00.006-05:00</published><updated>2009-02-12T08:19:32.537-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Version 7.50 Chart Memory Errors</title><content type='html'>We have a client who is using QlikView version 7.50. Memory errors on the charts have been a problem ("out of object memory", "allocated memory exceeded") with this version. QlikTech's advice was to upgrade to the more stable version 7.52 but for various reasons that wasn't going to happen. It gradually became clear that the memory issues occur after someone reloads data into the report. Simply saving and closing and then re-opening the report after a reload solves almost all of the chart memory problems we have with this version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2100813049336884824?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2100813049336884824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2100813049336884824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2100813049336884824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2100813049336884824'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/02/version-750-chart-memory-errors.html' title='Version 7.50 Chart Memory Errors'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6456622409079212768</id><published>2009-01-31T21:59:00.006-05:00</published><updated>2009-02-01T11:55:54.857-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>QlikView Exists Function</title><content type='html'>&lt;p&gt;One QlikView function I use often in the loadscript is the &lt;em&gt;Exists&lt;/em&gt; function. You give it a value or expression and the name of a field and it tells you if the value already has been loaded into the field. The function returns a &lt;em&gt;True&lt;/em&gt; or &lt;em&gt;False&lt;/em&gt; so it can be used in the &lt;em&gt;Where&lt;/em&gt; clause of a &lt;em&gt;Load&lt;/em&gt; statement or in an &lt;em&gt;If&lt;/em&gt; statement.  There are a lot of uses for the function and below are three examples that I’ve used recently. For the first example, I use it near the end of the loadscript when I am loading master data to match data already loaded in previous tables. Here’s what the code might look like when loading a product description to go along with previously loaded product code values:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;PRODUCT_MASTER:&lt;br /&gt;Load&lt;br /&gt;PRODUCT_CODE,&lt;br /&gt;PRODUCT&lt;br /&gt;Where Exists(PRODUCT_CODE);&lt;br /&gt;SQL SELECT&lt;br /&gt;PRODUCT_CODE,&lt;br /&gt;PRODUCT_CODE' - 'DESCRIPTION AS PRODUCT&lt;br /&gt;FROM PRODUCT_MASTER;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;That piece of code will only load product descriptions for product codes that were already loaded in previous tables. Note that the &lt;em&gt;Exists &lt;/em&gt;function is a QlikView function so it is used as part of the QlikView Load statement and not as part of the SQL statement. Only one argument for the function is used in this case since the field name and the value to be checked are the same.&lt;br /&gt;&lt;br /&gt;A second example of a place I use the Exists function is when I load temporary tables with special field names and values that fit a particular type or grouping so I can use the values to differentiate values in other fields I’m loading. Here’s an example: I load product codes into a special field that will contain only product codes for products made with 100% recycled materials:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;TEMP_RECYCLE_PRODUCTS:&lt;br /&gt;Load&lt;br /&gt;PRODUCT_CODE as RECYCLE_PRODUCT&lt;br /&gt;Resident PRODUCT_MASTER&lt;br /&gt;Where CONTENT='100 POST-CONSUMER RECYCLE'; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Now, I can use that field name, RECYCLE_PRODUCT, with the Exists function as I load or process other data. This technique is especially useful when the data is coming from different sources where something like a SQL join is not available. I might use it like this when loading other data:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;GREEN_SALES:&lt;br /&gt;//Sales of product made from recycled materials&lt;br /&gt;Load&lt;br /&gt;CUSTOMER,&lt;br /&gt;SALES_DATE,&lt;br /&gt;QUANTITY&lt;br /&gt;Resident 2009_SALES_DETAIL&lt;br /&gt;Where Exists(RECYCLE_PRODUCT,PRODUCT_CODE);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Drop table TEMP_RECYCLE_PRODUCTS; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;At the end of the loadscript or when it is no longer needed you should drop temporary tables so that they don't unnecessarily use up memory or create unneeded associations. &lt;/p&gt;&lt;p&gt;In this third example, I use the Exists function to load only the first of a set of identical values as they are read in the input data. For example, this piece of code in the loadscript will only load data for the first time an error message appears in an error message log file. The input from the database is sorted into timestamp order and the Exists function in the Load statement checks to see if the specific error message value has already been loaded:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ERROR_HISTORY:&lt;br /&gt;Load&lt;br /&gt;ERROR_TIMESTAMP,&lt;br /&gt;ERROR_MESSAGE&lt;br /&gt;Where Not Exists(ERROR_MESSAGE);&lt;br /&gt;SQL SELECT&lt;br /&gt;ERROR_TIMESTAMP,&lt;br /&gt;ERROR_MESSAGE&lt;br /&gt;FROM MESSAGES_LOG&lt;br /&gt;ORDER BY ERROR_TIMESTAMP; &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6456622409079212768?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6456622409079212768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6456622409079212768' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6456622409079212768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6456622409079212768'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/01/qlikview-exists-function.html' title='QlikView Exists 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6770649003461160185</id><published>2009-01-24T11:34:00.007-05:00</published><updated>2009-01-25T15:03:06.140-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='sheet object'/><title type='text'>Benefits of Concatenating a Code and Description</title><content type='html'>In the typical business report in a corporate environment you need to include quite a few selections either through a list box or multi-box. There may be selections for product, customer, sales executive, division, channel, product type, country, fiscal period, etc. You probably have codes for those things in your corporate databases and, if you’re lucky, you also have descriptions that go along with the codes.&lt;br /&gt;&lt;br /&gt;When we build a new QlikView report we design the loadscript to load not just the codes but also the concatenation of the code and the corresponding description separated by a hyphen. That part of the loadscript code might look like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;PRODUCT_MASTER:&lt;br /&gt;SQL SELECT&lt;br /&gt;&amp;nbsp;&amp;nbsp;PRODUCT_CODE,&lt;br /&gt;&amp;nbsp;&amp;nbsp;PRODUCT_CODE||' - '||DESCRIPTION AS PRODUCT&lt;br /&gt;FROM PRODUCT_MASTER;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then, we use the &lt;em&gt;PRODUCT&lt;/em&gt; field in list boxes, multi-boxes and in the chart dimensions. The reason this idea is so valuable is because of QlikView’s behavior when you are making a selection: if you click on the title bar of a list box or on the down arrow of a multi-box and then start typing, the visible list of items changes to show only the ones that match what you have typed so far.&lt;br /&gt;&lt;br /&gt;For example, if you click the down-arrow on the multi-box selection for our example field, PRODUCT; and then start typing &lt;strong&gt;baby&lt;/strong&gt; -- all of the products that contain the word &lt;em&gt;“baby”&lt;/em&gt; in the product description move to the top of the list high-lighted with a white background. Keep typing, &lt;strong&gt;baby lotion&lt;/strong&gt;… and now only the products whose names contains the words &lt;em&gt;“baby lotion”&lt;/em&gt; are on the top of the list. At that point you can either press the &lt;em&gt;Enter key&lt;/em&gt; which will select all of the high-lighted products or you can click on an individual product with your mouse. If that field only contained product codes then you would be limited to typing in a subset of the product code – which you can still do, of course, with the concatenated field values but the extra value of being able to type in a partial description to help with the selection is extremely useful.&lt;br /&gt;&lt;br /&gt;A description for a code value is so useful that we have sometimes loaded the description data from a spreadsheet when it isn’t available on the corporate database. Then it is joined and concatenated to the code value in the loadscript.&lt;br /&gt;&lt;br /&gt;Using the concatenated code and description as a dimension in the charts also works well. The field still sorts by product code since that is the leftmost part of the field value. Often we shorten the field width so that just the product code is showing on the screen but moving your cursor over the field reveals the complete description.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6770649003461160185?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6770649003461160185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6770649003461160185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6770649003461160185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6770649003461160185'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/01/concatenating-code-and-description.html' title='Benefits of Concatenating a Code and Description'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6140524062807831687</id><published>2009-01-22T13:07:00.002-05:00</published><updated>2009-01-25T15:11:32.022-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Error: fetched column value was truncated</title><content type='html'>I got an error yesterday on a QlikView document that had reloaded dozens of times before. It appeared to be an Oracle SQL error. The error message that appeared in the pop-up box during loading said, &lt;em&gt;SQL Error:[Oracle][ODBC][Ora]ORA-01406:fetched column value was truncated&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Despite appearing like a SQL error, the piece of SQL code didn’t cause any errors when submitted through Oracle &lt;em&gt;SQL*Plus&lt;/em&gt;. It only caused an error when used to load a table in the QlikView document. I was using QlikView version 8.50.6206.5.&lt;br /&gt;&lt;br /&gt;With a little trial-and-error I narrowed down the source of the problem to a single database column, named QTY, which was defined in the Oracle database as a FLOAT. Since this document had reloaded successfully in the past, it must be the new data stored in the table that is causing the problem now.&lt;br /&gt;&lt;br /&gt;In any case, I was able to make the document load and satisfy the reporting requirements by simply changing the SQL a  little from &lt;strong&gt;SQL SELECT QTY…&lt;/strong&gt; to &lt;strong&gt;SQL SELECT ROUND(QTY,2)… &lt;/strong&gt;After this change, the document reloaded with no problem.&lt;br /&gt;&lt;br /&gt;I’m hoping this blog entry might help someone fix the problem if it happens to them. And, inasmuch as this blog also serves as my own QlikView notes it might serve as a reminder to myself when it happens again in one of my documents.&lt;br /&gt;&lt;br /&gt;(Note the comment describing another experience with this error)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6140524062807831687?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6140524062807831687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6140524062807831687' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6140524062807831687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6140524062807831687'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/01/error-fetched-column-value-was.html' title='Error: fetched column value was truncated'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2097263502049617693</id><published>2009-01-14T15:15:00.005-05:00</published><updated>2009-01-14T15:33:15.271-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='field names'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Load a Table With All of the Values for a Field</title><content type='html'>An idea for developers of large reports--&lt;br /&gt;&lt;br /&gt;Sometimes in the loadscript you need to build a table that contains all of the previously loaded values from the tables that have already been loaded. This situation comes up when a &lt;em&gt;concatenated key&lt;/em&gt; has been used in the tables. For example, you might have a report that loads data into several tables from different sources but you’ve loaded each of the tables so that it has a key field comprised of product_code, customer_number, ship_location, and ship_date; all concatenated together but separated with an underscore character. This technique is sometimes used in large reports in order to reduce memory requirements by minimizing the number of &lt;em&gt;synthetic keys&lt;/em&gt; that QlikView must create. Each of the large tables shares only one field, the concatenated key field, instead of sharing multiple fields and causing QlikView to build the synthetic keys.&lt;br /&gt;&lt;br /&gt;At the bottom of the loadscript you must collect all of the concatenated key values and explode them into the individual fields so that QlikView can build the associations. If the concatenated key from our example is named CCKEY then code like this would load all of the existing CCKEY values:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ALL_CCKEY_TABLE:&lt;br /&gt;Load&lt;br /&gt;FieldValue('CCKEY',IterNo()) as CCKEY&lt;br /&gt;AutoGenerate(1)&lt;br /&gt;While not Isnull(FieldValue('CCKEY',IterNo()));&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That will create a table of all CCKEY values. Now add the part that splits out the fields based on the underscore separator character:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Left join load&lt;br /&gt;CCKEY,&lt;br /&gt;subfield(CCKEY,'_',1) as product_code,&lt;br /&gt;subfield(CCKEY,'_',2) as customer_number,&lt;br /&gt;subfield(CCKEY,'_',3) as ship_location,&lt;br /&gt;subfield(CCKEY,'_',4) as ship_date&lt;br /&gt;Resident ALL_CCKEY_TABLE;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;A table like this loads very fast since all of the data is already available in memory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2097263502049617693?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2097263502049617693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2097263502049617693' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2097263502049617693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2097263502049617693'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/01/load-table-with-all-of-values-for-field.html' title='Load a Table With All of the Values for a 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6838363073883163</id><published>2009-01-10T07:37:00.003-05:00</published><updated>2009-01-14T07:56:53.017-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qvw'/><title type='text'>Archive Data</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/SWiY92JjzMI/AAAAAAAAAE4/qxbazUNE6IQ/s1600-h/QM_blog_14.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5289645950621699266" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 197px" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/SWiY92JjzMI/AAAAAAAAAE4/qxbazUNE6IQ/s200/QM_blog_14.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;We sometimes use QlikView as a method for capturing and saving data for archive purposes. These reports aren’t normally used unless someone needs to review historic data or research data to answer a question. For example, if we have a project where we might need to check on what the product master looked like six weeks ago (most companies only care about current master data and they don’t keep track of historic master data), then we might set up a daily job that loads a QlikView document with the product master and any associated data. Then, the document is simply saved in case it is needed. We usually give the document file a filename containing the date to help organize the files.&lt;br /&gt;&lt;br /&gt;This advantage of this method over some kind of data dump file is that the method for reviewing the data (QlikView) is automatically part of the process. Anyone who needs to review the data need only click on one of the files in the archive folder. The data in QlikView qvw files is stored in compressed form so no further zipping is needed to conserve disk space.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6838363073883163?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6838363073883163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6838363073883163' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6838363073883163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6838363073883163'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/01/archive-data.html' title='Archive Data'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/SWiY92JjzMI/AAAAAAAAAE4/qxbazUNE6IQ/s72-c/QM_blog_14.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2161919928958009737</id><published>2009-01-06T17:38:00.007-05:00</published><updated>2009-01-07T14:39:47.418-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><title type='text'>Adding an Image to the Document</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SWPfICX87nI/AAAAAAAAAEw/SS-wFMn4ypE/s1600-h/QM_blog_13.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5288315716632374898" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 200px; CURSOR: hand; HEIGHT: 151px" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SWPfICX87nI/AAAAAAAAAEw/SS-wFMn4ypE/s200/QM_blog_13.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;You can easily add visual interest to your QlikView document with a few lines or colored boxes or graphic elements. Add lines of any thickness or color by selecting from the menu &lt;strong&gt;Layout-&gt;New Sheet Object-&gt;Line/Arrow Object...&lt;/strong&gt; The object properties are used to adjust the color and appearance of the line or arrow. You can drag the line around your document to get the most logical or appealing placement.&lt;br /&gt;&lt;br /&gt;For colored boxes that stand out from the tab or sheet background insert a &lt;em&gt;text object&lt;/em&gt; (&lt;strong&gt;Layout-&gt;New Sheet Object-&gt;Text Object&lt;/strong&gt;). In the object properties choose a background color that works well with the sheet background. Drag the text object around and adjust the size with your mouse. Whether you actually have text in your text object is up to you. The text objects can be overlaid or layered with other sheet objects like charts. This is a common way to add a legend or explanation of the data that will appear alongside a chart. The Layout tab in the object properties has a Layers setting that will help with overlapping objects. The transparency setting can also help with layered objects. Don't hesitate to click the &lt;em&gt;Help&lt;/em&gt; button for more information if you see something that you don't understand.&lt;br /&gt;&lt;br /&gt;The background of the tab or sheet can be changed by right-clicking on the top of the sheet where the tab label is. Then select &lt;em&gt;Sheet Properties&lt;/em&gt; and look for the controls that adjust background color or let you add an image. A background photograph is often too busy for a sheet containing chart objects but it may be perfect for a title sheet. The background and colors of a well-designed website might give you some ideas for how to design the sheets of your document.&lt;br /&gt;&lt;br /&gt;The text object can show a diagram or picture. This is an easy way to add a corporate or department or project logo to the document. When you add the text object look at the &lt;em&gt;General&lt;/em&gt; tab of the object properties. In the &lt;em&gt;Background&lt;/em&gt; area click the &lt;em&gt;Image&lt;/em&gt; button and then the &lt;em&gt;Change&lt;/em&gt; button (btw- note how QlikView uses lines and boxes to group the logical elements of the properties window… a few lines can make the information on your document easier to understand too). Then you can select a jpg or png file from your computer and insert it into the document. Try it out! Even if you are designing a business document there's no need to be boring. Insert a cartoon image of your boss... but before the document is seen by company management you should make sure the image is respectable and that you or your company own the rights. Consider this method for adding a diagram to your document or adding photos of products or a map of locations.&lt;br /&gt;&lt;br /&gt;Text objects can be set up so that they appear or are invisible based on the data. On the text object &lt;em&gt;Layout&lt;/em&gt; tab you can click the &lt;em&gt;Conditional&lt;/em&gt; button and then enter an expression that will control whether the text box is visible or not. You could make the text object visible based on the person using the report, the loaded data, time of day, or day of the week. Use it to alternate between two or more different text objects with different images. For example, in a corporate dashboard application you could make the image of a sunny day or of a stormy day appear based on the current month's revenue versus last month (or whatever passes for good news versus bad news in your business). The expression should be something that evaluates to a zero or a non-zero value. If the value is zero then the text object is not visible.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2161919928958009737?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2161919928958009737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2161919928958009737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2161919928958009737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2161919928958009737'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2009/01/adding-image-to-document.html' title='Adding an Image to the 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/SWPfICX87nI/AAAAAAAAAEw/SS-wFMn4ypE/s72-c/QM_blog_13.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1331306287854017364</id><published>2008-12-27T10:36:00.004-05:00</published><updated>2009-01-07T09:01:18.683-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='script'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>See a Title Tab When Report Opens</title><content type='html'>Normally, the active sheet or tab a person sees when they open a QlikView document is the sheet that was active when the document was last saved. So, the easiest way to influence which sheet a person sees when they open the document is just to be careful which sheet is active when the document is saved and closed.&lt;br /&gt;&lt;br /&gt;You can also control which sheet or tab a person sees when they open a QlikView report with a small macro. We often do this when a report contains a title tab. The title tab contains information &lt;em&gt;about&lt;/em&gt; the report. It would show the report title, of course, and could also show the date the data was loaded, databases used, contact info for the author or support person, security label, etc. It is also a great place for a company logo or other identifying graphics.&lt;br /&gt;&lt;br /&gt;Step one is to build the tab you want users to see when they open the report.&lt;br /&gt;&lt;br /&gt;Second, create a small macro (&lt;strong&gt;Settings-&gt;Document Properties...-&gt;Macros&lt;/strong&gt;). For example, if the name of the title tab is Title_Tab then the macro would look like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Sub Activate_Title_Tab&lt;br /&gt;'---------------------&lt;br /&gt;ActiveDocument.Sheets("Title_Tab").Activate&lt;br /&gt;End sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then, associate the macro with the &lt;em&gt;OnOpen&lt;/em&gt; document event trigger and click OK.&lt;br /&gt;&lt;br /&gt;Now you have a macro that is executed whenever the document is opened and the macro activates the tab that you want the user to see first. The Activate_Title_Tab macro is also available to be associated with a button or other events or executed by other macros when it is appropriate to switch to a particular sheet or tab.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1331306287854017364?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1331306287854017364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1331306287854017364' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1331306287854017364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1331306287854017364'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/12/see-title-tab-when-report-opens.html' title='See a Title Tab When Report Opens'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4656630822784551110</id><published>2008-12-14T14:48:00.004-05:00</published><updated>2008-12-18T18:07:09.354-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Loading Variables With A Macro</title><content type='html'>In order to complete the discussions on the automated loading of QlikView document variables I have to provide an example of loading the variables and values from a file using a QlikView macro. This would be useful for an application that can't load variables as part of the loadscript. If your loadscript needed to have the variables already loaded then you would need to load the variables before beginning the loadscript. Or you might load a group of variables based on something that the report user does to the report, like loading in a set of historical monetary conversion factors in order to do analysis of historical finance data. Here's an example of how it could be done.&lt;br /&gt;&lt;br /&gt;This is written as a function but it could also be done as a subroutine. Because this function is part of an application that runs automatically and unattended on a server it has more error-detection than you might ordinarily use. A subroutine that is invoked as a QlikView macro would have to call this function.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Function SET_RPT_VARS()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'----------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Set document variables based on the data in RPT_VARS.csv file. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'File is comma-delimited. First field on each record is variable name. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Second field is variable value. First record is column labels. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim varsfile, varsrec, tempvar, tempvalue, ret, recctr &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="SET_RPT_VARS Error" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;recctr=0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error resume next &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set fso=CreateObject("Scripting.FileSystemObject") &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to create FileSystemObject"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error goto 0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If not fso.FileExists("RPT_VARS.csv") then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: RPT_VARS.csv file not found"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error resume next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set varsfile=fso.OpenTextFile("RPT_VARS.csv",1,False,0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;then SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to OpenTextFile"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error goto 0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Do While not varsfile.AtEndofStream 'loop through the file &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;recctr=recctr+1 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error resume next &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;varsrec=varsfile.ReadLine &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 then &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to ReadLine" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error goto 0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If recctr &gt; 1 then &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'ignore first record column labels&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error resume next &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;tempvar=Trim(Left(varsrec,Instr(1,varsrec,",")-1))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to extract tempvar" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;tempvalue=Trim(Right(varsrec,Len(varsrec)-Instr(1,varsrec,","))) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 then &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to extract tempvalue" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ret=ActiveDocument.CreateVariable(tempvar) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 then &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to CreateVariable" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ret=ActiveDocument.GetVariable(tempvar).SetContent(tempvalue,false) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If Err.Number &lt;&gt; 0 then &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS="ERROR: SET_RPT_VARS, unable to SetContent" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Err.Clear &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Exit Function &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;On error goto 0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Loop 'end of loop through file &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;varsfile.Close &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SET_RPT_VARS=FormatNumber(recctr-1,0) + " document variables created from RPT_VARS.CSV" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;set fso=nothing &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;set varsfile=nothing &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End Function&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-4656630822784551110?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4656630822784551110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=4656630822784551110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4656630822784551110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4656630822784551110'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/12/loading-variables-with-macro.html' title='Loading Variables With A Macro'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1008935376752923225</id><published>2008-12-09T16:09:00.005-05:00</published><updated>2008-12-09T16:33:04.125-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='reference manual'/><title type='text'>QlikView Tutorial</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/ST7gB7qHxDI/AAAAAAAAAEo/ocDAYP81K10/s1600-h/QM_blog_12.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5277902137123652658" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 200px; CURSOR: hand; HEIGHT: 124px" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/ST7gB7qHxDI/AAAAAAAAAEo/ocDAYP81K10/s200/QM_blog_12.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;People often come across this blog when they are searching the web for information about how to use QlikView. If you have a working copy of QlikView on your computer then you already have links to excellent information. Start up the QlikView application and look at the start page -- click &lt;em&gt;Resources&lt;/em&gt; and you should see something like the picture on the left. Those links will take you to current information about QlikView. There's a lot of basic info but it isn't just for beginners - I never fail to find something new and useful in the QlikTech and QlikCommunity websites.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;If you don't have a working copy of QlikView or can't find the start page then follow this link: &lt;a href="http://www.qlikview.com/learnmore.aspx" target="QlikView Information"&gt;&lt;i&gt;Click here for QlikView Information&lt;/i&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;or follow this link to the QlikCommunity: &lt;a href="http://www.qlikcommunity.com/" target="QlikCommunity"&gt;&lt;i&gt;Click here for QlikCommunity&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1008935376752923225?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1008935376752923225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1008935376752923225' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1008935376752923225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1008935376752923225'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/12/qlikview-tutorial.html' title='QlikView Tutorial'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/ST7gB7qHxDI/AAAAAAAAAEo/ocDAYP81K10/s72-c/QM_blog_12.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-4889257478441282726</id><published>2008-12-04T18:25:00.005-05:00</published><updated>2008-12-06T09:11:01.766-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='command line'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><category scheme='http://www.blogger.com/atom/ns#' term='.bat script'/><title type='text'>Variables in the .bat script</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/SThoy-zzCHI/AAAAAAAAAEg/PVnIuCA94wA/s1600-h/QM_blog_11.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5276082188527536242" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 200px; CURSOR: hand; HEIGHT: 155px" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/SThoy-zzCHI/AAAAAAAAAEg/PVnIuCA94wA/s200/QM_blog_11.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;This series of blog postings about variables has probably been of interest mostly to technical folks concerned with automating QlikView documents. This one is also like that only more so. Here’s some automation wisdom that you won’t find anywhere else:&lt;br /&gt;&lt;br /&gt;We have a set of reports where the document variables contain all the file pathnames and database access names. Loading of the reports is handled by Windows &lt;em&gt;.bat scripts&lt;/em&gt;. We saw that the .bat scripts also needed to be able to use flexible file pathnames and database access. The variables and their values are stored in a comma-delimited file (a .csv file). The .bat scripts load their variables from the same file that the QlikView documents use to load their variables.&lt;br /&gt;&lt;br /&gt;This is a .bat script command that will load DOS variables from a comma-delimited file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FOR /F "skip=1 tokens=1-2 delims=," %%a IN ('type ..\Report_Control\RPT_VARS.csv') DO set %%a=%%b&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That one line reads a comma-delimited text file named RPT_VARS.csv that is stored in a folder named ..\Report_Control&lt;br /&gt;Skip=1 tells it to skip over the first line of the file (because it contains column titles).&lt;br /&gt;The text file is simple. It looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Variable Name,Variable Value&lt;br /&gt;RPT_DBNAME,INVT_PROD&lt;br /&gt;RPT_INPUT,E:\CURRENT\DATA\&lt;br /&gt;RPT_OUTPUT,\\AMSERV28\PROJECTS\&lt;br /&gt;RPT_LOG,C:\LOGS\BATCHLOG.TXT&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Within the .bat script the variables are used between percent signs. So a line in the script might look like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;echo %date%,%time% QV Batch started &gt;&gt; %RPT_LOG%&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;HR&gt;&lt;br /&gt;One of the reasons we stored all of the pathnames and access parameters in an external file that could be turned into variables is that it simplified the &lt;em&gt;change control&lt;/em&gt; or &lt;em&gt;promote to production&lt;/em&gt; process. We could develop a QlikView report and the associated scripts on a development server and then easily move the report and scripts as files to the QA server or production server without any changes. The programs would run correctly after being promoted to QA or production because they picked up the appropriate pathnames and database access variables info from the comma-delimited file stored on the new server.&lt;br /&gt;&lt;br /&gt;We name a lot of our files with a &lt;em&gt;yyyymmdd&lt;/em&gt; datestamp in the filename, for example “20081126_NorthRegion.dat”. It’s easy to create today’s yyyymmdd date in the .bat script as a variable with this script line:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FOR /F "tokens=1-4 delims=/- " %%A in ('date/T') do set TTDATE=%%D%%B%%C&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then it can be used in the .bat script as part of a filename like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;COPY CURRENT.DAT %TTDATE%_NorthRegion.dat&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-4889257478441282726?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/4889257478441282726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=4889257478441282726' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4889257478441282726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/4889257478441282726'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/12/variables-in-bat-script.html' title='Variables in the .bat script'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/SThoy-zzCHI/AAAAAAAAAEg/PVnIuCA94wA/s72-c/QM_blog_11.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5408066854883248505</id><published>2008-12-02T21:41:00.004-05:00</published><updated>2008-12-02T21:56:43.535-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Loading Variables Via Loadscript</title><content type='html'>You have two basic alternatives if you want to load document variables from a database or file. You can load them as part of the loadscript as you load data for reporting, or, you can load them through a macro script either within the QlikView document or external to the document.&lt;br /&gt;&lt;br /&gt;In order to load variables from a database or file you must first have the variable names and the variable contents defined in the database table or in the file. The file might be a spreadsheet or text file but it must have one column or field defined for the variable names and a second column or field defined for the variable contents.&lt;br /&gt;&lt;br /&gt;Within the QlikView loadscript you first load the variable names and contents into a QlikView table. From a database you might code it something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;RPT_VARS:&lt;br /&gt;SQL SELECT&lt;br /&gt;VAR_NAME,&lt;br /&gt;VAR_VALUE&lt;br /&gt;FROM REPORT_VARIABLES;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then insert some code like this to convert the table into document variables:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Let RowCount = NumMax(NoOfRows('RPT_VARS'),0)-1;&lt;br /&gt;For i=0 to '$(RowCount)'&lt;br /&gt;&amp;nbsp;&amp;nbsp;Let TempVarName = peek('VAR_NAME',$(i),'RPT_VARS');&lt;br /&gt;&amp;nbsp;&amp;nbsp;Let TempVarValue = peek('VAR_VALUE',$(i),'RPT_VARS');&lt;br /&gt;&amp;nbsp;&amp;nbsp;Let $(TempVarName) = '$(TempVarValue)';&lt;br /&gt;&amp;nbsp;&amp;nbsp;next&lt;br /&gt;&lt;br /&gt;//If the table is no longer needed it can be dropped&lt;br /&gt;Drop table RPT_VARS;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Note the NumMax function. That is necessary if the RPT_VARS table were ever empty; a null RowCount variable will cause a never-ending loop.&lt;br /&gt;&lt;br /&gt;At work we have some reports where all of the expressions and titles and field labels are handled with variables. This allows us to use the same report at several different companies but the appearance and functionality of the report is tailored to local terminology and business practice. Another way to use this concept might allow the same report at a single company to look and work differently when it loads data from different databases that contain different sets of customized variables. So, a standard sales report could look different for the Commercial Division than it does at the Baked Goods Division.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5408066854883248505?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5408066854883248505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5408066854883248505' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5408066854883248505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5408066854883248505'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/12/loading-variables-via-loadscript.html' title='Loading Variables Via 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5113723612106582487</id><published>2008-11-26T17:08:00.013-05:00</published><updated>2009-02-15T11:42:59.285-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Listing All Variables and Contents</title><content type='html'>After last weeks blog posting I got some questions about how you might list out all of the document variables and their contents. It can be a useful thing for reports that depend on variables for their functionality and useful for corporate developers who must document report functionality.&lt;br /&gt;&lt;br /&gt;Below is a Microsoft Excel macro that could help you. When you run this macro it will ask you to select a QlikView report file and then it will copy all of the document variables and their contents into the current worksheet. Once the data is in a spreadsheet you can sort it, print it, search it for particular fields or functions, or write it out as a text or tab-delimited file. In a future blog posting I'll show how variables can be loaded into a report from a spreadsheet which, along with the macro below, will give you a method for sharing and maintaining variables.&lt;br /&gt;&lt;br /&gt;You can get a copy of the spreadsheet with the macro installed and a button that runs the macro at this website: &lt;a href="http://finmagic.0catch.com/" target="List QV Variables"&gt;&lt;i&gt;http://finmagic.0catch.com/&lt;/i&gt;&lt;/a&gt;&amp;nbsp; The spreadsheet on the website also includes a button that will list all variables from a currently open QlikView document (sorry about the advertisements on the site - just click on the spreadsheet downloads).&lt;br /&gt;Here's the Excel macro code. You can copy and paste the macro code from this window and put it into your own spreadsheet if you want to build your own.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Sub List_QV_Variables()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'This Excel macro will ask you to select a QlikView Report File and&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'then it will put the variable names and contents into your current worksheet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'--Tim Benoit, Nov 2008&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim oQV, oRpt, oVars, oTempVar, oThisVar, qv_fn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Get the QlikView report pathname&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;qv_fn = Application.GetOpenFilename("QlikView Report File (.),*.*", , "Select a QlikView .qvw Report File", False)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If qv_fn = 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Write out some heading text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveSheet.Cells(1, 1).Formula = "QlikView Variables List"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveSheet.Cells(2, 1).Formula = "Report pathname:"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveSheet.Cells(2, 2).Formula = qv_fn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveSheet.Cells(3, 1).Formula = "Variable Name"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveSheet.Cells(3, 2).Formula = "Variable Content"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Open the QlikView report file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set oQV = CreateObject("QlikTech.QlikView")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set oRpt = oQV.OpenDoc(qv_fn)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set oVars = oRpt.GetVariableDescriptions&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Loop through the variables&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;For i = 0 To oVars.Count - 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;Set oTempVar = oVars.Item(i)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;varname = Trim(oTempVar.Name)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;Set oThisVar = oRpt.Variables(varname)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;varcontent = oThisVar.GetRawContent&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;'Write data into worksheet cells&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;ActiveSheet.Cells(i + 4, 1).NumberFormat = "@"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;ActiveSheet.Cells(i + 4, 1).Formula = varname&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;ActiveSheet.Cells(i + 4, 2).NumberFormat = "@"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;ActiveSheet.Cells(i + 4, 2).Formula = varcontent&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;'Close QlikView&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;oRpt.CloseDoc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;oQV.Quit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5113723612106582487?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5113723612106582487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5113723612106582487' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5113723612106582487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5113723612106582487'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/11/listing-all-variables-and-contents.html' title='Listing All Variables and Contents'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-550137936487668043</id><published>2008-11-21T20:59:00.008-05:00</published><updated>2008-11-23T14:48:39.142-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='script'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Copying Variables From One QlikView Report to Another</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/SSdrAQksONI/AAAAAAAAAEA/PPeF0k8ccC0/s1600-h/QM_blog_10.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5271299541053487314" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 185px; CURSOR: hand; HEIGHT: 200px" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/SSdrAQksONI/AAAAAAAAAEA/PPeF0k8ccC0/s200/QM_blog_10.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Today, one of the guys at work was trying to figure out how to transfer all of the document variables from one QlikView report to another. We discussed some of the things we've done in the past: loading variables and values from a spreadsheet or database either through the loadscript or through macro code. We even have an older application that stores variables in a table with loadscript code and then the report is used as a "binary" in another report's loadscript and the second report turns the table values back into variables. But, none of those options seemed to fit the requirement. One obstacle is that we could not figure out an easy way to export all of the variables and values from a report. You can export the expressions from the Expression Overview but the Variable Overview has no similar function.&lt;br /&gt;&lt;br /&gt;With some help from &lt;em&gt;Lars at Brait AB&lt;/em&gt; (a reader of this blog, Thanks, Lars!) who suggested a way to loop through the variables, I tested the VBScript below that can transfer variables from one report to another. I created a small text file on my laptop named "tbtest.vbs" and typed this code into it: &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;' /* Test Moving a variable from one QV report to another */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Option Explicit&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim objQV, objSource, objDest, objSourceVar, objDestVar &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Dim objVars, varcontent, objTempVar, varname, i&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;'initialize&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set objQV=CreateObject("QlikTech.QlikView")&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set objSource=objQV.OpenDoc("C:\QVfolder\Source_rpt.qvw") &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Set objDest=objQV.OpenDoc("C:\QVfolder\Dest_rpt.qvw")&lt;br /&gt;set objVars = objSource.GetVariableDescriptions&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;'Loop through the variables&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;for i = 0 to objVars.Count - 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;set objTempVar = objVars.Item(i)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;varname=Trim(objTempVar.Name) &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;Set objSourceVar=objSource.Variables(varname) &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;varcontent=objSourceVar.GetRawContent&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;'display the variable to check on progress if needed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;msgbox(varname &amp;amp; " = " &amp;amp; varcontent)&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;div&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;'update the value of variable in Destination report&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;Set objDestVar=objDest.Variables(varname)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;If objDestVar is nothing then&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'must need to create variable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objDest.CreateVariable varname&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set objDestVar=objDest.Variables(varname)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;objDestVar.SetContent varcontent,true&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;div&gt;&lt;br /&gt;next 'end of loop &lt;/div&gt;&lt;div&gt;&lt;br /&gt;'save Destination Report if desired&lt;/div&gt;&lt;div&gt;objDest.Save&lt;/div&gt;&lt;div&gt;&lt;br /&gt;'we're done, close down&lt;/div&gt;&lt;div&gt;objSource.CloseDoc&lt;/div&gt;&lt;div&gt;objDest.CloseDoc&lt;br /&gt;objQV.quit&lt;br /&gt;WScript.Quit&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;In order to run it, I just double-clicked on the tbtest.vbs file on my desktop. You can see the pathname to the two QlikView report files in the code. This script successfully copied the variables and their values from the source report to the destination report.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;If you omit the part of the script that opens and updates the destination report you could turn it into a script that lists out all of the report variables and their contents -- something that is not available with the regular variable overview.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-550137936487668043?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/550137936487668043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=550137936487668043' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/550137936487668043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/550137936487668043'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/11/copying-variable-from-one-qlikview.html' title='Copying Variables From One QlikView Report to Another'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/SSdrAQksONI/AAAAAAAAAEA/PPeF0k8ccC0/s72-c/QM_blog_10.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3563977630058790608</id><published>2008-11-14T16:20:00.010-05:00</published><updated>2008-12-18T18:13:50.001-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><title type='text'>Putting a Count in the Chart Title</title><content type='html'>In my company we write a lot of QlikView reports to validate data. As part of our software projects we must check data to see that it matches assumptions and expectations. We also check the data against any other source available to validate data accuracy. Often, one of the simpler but important things on those reports is a count of things.&lt;br /&gt;&lt;br /&gt;For example, a report might include a table box showing ITEM data. Instead of just showing the word ITEM in the table box title, we put a count of the ITEMs in the title. You can change the title on most sheet objects by right-clicking on the object and choosing &lt;em&gt;Properties&lt;/em&gt;. The &lt;em&gt;Title&lt;/em&gt; is in the &lt;em&gt;General&lt;/em&gt; tab. The title might contain this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=Num(Count(Distinct ITEM),'###,###') &amp;amp; ' ITEMs'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That gives us a count of the number of ITEMs that is formatted with the NUM function to use a comma as a thousands separator. The title then might show up on the chart as:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#333399;"&gt;&lt;span style="font-family:arial;"&gt;&amp;nbsp;&amp;nbsp;1,220 Items&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;A List Box for the field named Location might contain this in the title:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=Num(Count(Distinct Location),'###,###') &amp;amp; ' Locations'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For another title you might want the number of sales orders in fiscal 2009. You can add an &lt;i&gt;If&lt;/i&gt; test with a text expression like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=Num(Count(Distinct If(fiscal_yr='2008',order_id)),'###,###') &amp;amp; ' 2009 Orders'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These counts will change depending upon your current selection. The counts don't necessarily need to be in a title. The object title limits you to a single line of text. You can put the counts into a text box and that will allow you to show the information on multiple lines. If you type this into a text box:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;=Num(Count(Distinct ITEM),'###,###') &amp;amp; ' ITEMs&lt;br /&gt;' &amp;amp; Num(Count(Distinct Location),'###,###') &amp;amp; ' Locations&lt;br /&gt;' &amp;amp; Num(Count(Distinct SDATE),'###,###') &amp;amp; ' Shipping Dates'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Note that the end-of-line or carriage return is part of the text. The text box will show up on the report saying something like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:arial;color:#333399;"&gt;&amp;nbsp;&amp;nbsp;1,220 Items&lt;br /&gt;&amp;nbsp;&amp;nbsp;15 Locations&lt;br /&gt;&amp;nbsp;&amp;nbsp;52 Shipping Dates&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;We have a report with a table box of &lt;em&gt;SKU&lt;/em&gt; data where &lt;em&gt;SKU&lt;/em&gt; ("stock-keeping unit") is a combination of item and location although the item and location fields are separate. The title for that table box contains this text expression that counts the number of occurrences of the concatenated item and location field values:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=Num(Count(Distinct ITEM&amp;amp;'@'&amp;amp;LOC),'###,###') &amp;amp; ' SKUs'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We often use charts with a &lt;em&gt;cycle group&lt;/em&gt; in the dimension. That allows the report user to easily switch the chart dimensions. The current setting of the cycle group can be used in the report title if it makes sense. So, for a chart where the cycle group is named "Corp Group", you can make it a part of the chart title like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;='Sales History by ' &amp;amp; GetCurrentField([Corp Group])&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;and then the chart title will switch between&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:arial;color:#333399;"&gt;&amp;nbsp;&amp;nbsp;Sales History by Customer&lt;br /&gt;&amp;nbsp;&amp;nbsp;Sales History by Fiscal Month&lt;br /&gt;&amp;nbsp;&amp;nbsp;Sales History by Region&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;as the report user clicks to switch dimensions using the cycle group.&lt;br /&gt;&lt;br /&gt;For a slightly more complex example of using the cycle group, consider a chart where the dimension is a cycle group named "Corp Group" and we want to include a count of dimension rows in the title. You could make the chart title like this:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;='Sales History - ' &amp;amp; Num(Count(Distinct $(cg_label_1)),'###,###,###') &amp;amp; ' ' &amp;amp; GetCurrentField([Corp Group]) &amp;amp; 's'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You must also define a document variable named cg_label_1 that contains the name of the specific cycle group being used in the dimension. The variable would contain this text:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;=GetCurrentField([Corp_Group])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;now the chart title will automatically switch between text like this as the cycle group changes:&lt;br /&gt;&lt;span style="font-family:arial;color:#333399;"&gt;&amp;nbsp;&amp;nbsp;Sales History - 4,800 Customers&lt;br /&gt;&amp;nbsp;&amp;nbsp;Sales History - 12 Fiscal Months&lt;br /&gt;&amp;nbsp;&amp;nbsp;Sales History - 6 Regions&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3563977630058790608?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3563977630058790608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3563977630058790608' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3563977630058790608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3563977630058790608'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/11/putting-count-in-chart-title.html' title='Putting a Count in the Chart Title'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6269882345647358111</id><published>2008-11-09T09:44:00.011-05:00</published><updated>2008-11-09T17:12:50.444-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Set Analysis</title><content type='html'>In QlikView version 8.50 there is new functionality called &lt;em&gt;Set Analysis&lt;/em&gt;. A "Set" as used in this functionality is similar to the already familiar concept of a &lt;em&gt;QlikView&lt;/em&gt; &lt;em&gt;Selection&lt;/em&gt;. This functionality allows you to define chart expressions that are calculated using something other than the current selection.&lt;br /&gt;&lt;br /&gt;QlikView's Selection capability is already a powerful, flexible capability -- essentially a grouping of data defined any way you choose. With Set Analysis you can compare two or more of these groupings quickly and easily. In the past, this kind of functionality in a QlikView report usually required special handling in the loadscript and table structure. Now, the Set Analysis can be set up using chart expressions and existing data.&lt;br /&gt;&lt;br /&gt;I'm sure that I will be writing again about the capabilities of this feature, so today I will only offer two examples of what can be done. These are simple to try out on a report so be sure to try them. Remember though that you will need new version 8.50. You can download the latest version of QlikView from the QlikTech or QlikCommunity websites.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;&lt;br /&gt;Imagine that you have a chart and one of the expressions shows historic inventory quantity. It might look like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sum( qty_inv_hist )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, add a new expression next to that first one that will show historic inventory quantity but using the &lt;em&gt;Previous Selection&lt;/em&gt;. "Previous Selection" is the selection you would get if you clicked on QlikView's Back button. The expression might look like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sum( {$1} qty_inv_hist )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note the curly braces that are part of this syntax. You now have a chart that compares data from the current selection to data from the previous selection. This is a very flexible feature. The previous selection might be: data from your top 5 sales regions, data from last month, data from last year, data from the Western states, data from regions where the new product has been introduced, data from products using blue labels, data from customers added in 2005, data from orders shipped by rail, etc. Get it? With little effort you can do kinds of data analysis you might never even have thought of before.&lt;br /&gt;&lt;br /&gt;Now, add another expression that will be calculated using a selection stored inside a bookmark. This is what the expression might look like for a bookmark named "TB Item List":&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sum( { "TB Item List" } qty_inv_hist )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Quotes are required around the bookmark name because it contains spaces (you could also use square braces, [ ], instead of quotes). The idea is similar to the expression that used a previous selection except that now the selection used in this expression will be based on the bookmark selection no matter what the current selection is in the report. The bookmark can be changed at any time, of course, and some people might find this feature easier to control than the one based on a previous selection. Using a bookmark is appropriate too for a complex selection that involves making selections from several fields. The idea of a Previous Selection as in the example above works only for the most recent field where you made a selection. If the selection you want to use in the chart expression involves several fields then a bookmark is the way to go. To make this a little easier for report users, you could use a variable in the expression for the bookmark name and give the report users an input box so that they can choose the bookmark to use without opening up the chart expressions. Remember that bookmarks can be exported and shared even among dissimilar reports (&lt;a href="http://qlikviewmaven.blogspot.com/2008/08/best-thing-about-bookmarks.html" target="Sharing Bookmarks"&gt;&lt;i&gt;Click here to read a little about sharing bookmarks&lt;/i&gt;&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The reference manual recommends that these set analysis features not be used on expressions that do calculations using fields from multiple QlikView tables. For example, an expression that multiplies historic inventory by a cost factor should not be used if the cost factor is from a different table within QlikView than the table where historic inventory is stored. Note that is is about where the fields are stored within the QlikView tables - it has nothing to do with the external source tables that were used for loading data. The manual says the results are "unpredictable" -- that's a good enough warning for me... it's like when the waiter says "don't order the fish" - you really will be better off if you take his advice and don't have fish for lunch.&lt;br /&gt;&lt;br /&gt;If you are interested in the Set Analysis functionality it will be worth your time to read about it in the version 8.50 reference manual. Post a comment to this blog or send me an email if you think of something unusual or clever you can do with set analysis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6269882345647358111?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6269882345647358111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6269882345647358111' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6269882345647358111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6269882345647358111'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/11/set-analysis.html' title='Set Analysis'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5865337493088056639</id><published>2008-11-09T08:14:00.006-05:00</published><updated>2008-11-26T17:45:40.799-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Variable Overview</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SRbiaKMRpxI/AAAAAAAAAD4/l0X3N8azBds/s1600-h/QM_blog_9.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5266645753296693010" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 200px; CURSOR: hand; HEIGHT: 128px" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SRbiaKMRpxI/AAAAAAAAAD4/l0X3N8azBds/s200/QM_blog_9.png" border="0" /&gt;&lt;/a&gt; I wrote about the &lt;em&gt;Expression Overview&lt;/em&gt; in a blog posting last week (&lt;a href="http://qlikviewmaven.blogspot.com/2008/11/expression-overview.html" target="Expression Overview"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;) so I feel I must drop the other shoe and mention the &lt;em&gt;Variable Overview&lt;/em&gt; that is available in the same menu, &lt;strong&gt;Settings-&gt;Variable Overview &lt;/strong&gt;or hold down the Ctrl+Alt+V keys at the same time for a hot-key shortcut.&lt;br /&gt;&lt;br /&gt;The &lt;em&gt;Variable Overview&lt;/em&gt; window shows two columns: &lt;em&gt;Variable Name &lt;/em&gt;and &lt;em&gt;Value&lt;/em&gt;. Click on the column headings to sort the list. Click the &lt;strong&gt;Add&lt;/strong&gt; button to add a new variable. If you click on one of the variables to select it, you can remove it with the &lt;strong&gt;Remove&lt;/strong&gt; button or edit the variable value in the &lt;em&gt;Definition&lt;/em&gt; box in the bottom of the window. For a long, complex variable you can click the tall button labeled with an elipsis ("&lt;strong&gt;. . .&lt;/strong&gt;") to open a full-screen window for editing.&lt;br /&gt;&lt;br /&gt;There's no way to print the contents of the window or export it to a file or search through the contents but the Variable Overview is very useful for working with reports that use a lot of variables. There is a &lt;strong&gt;Help&lt;/strong&gt; button but on my copy of QlikView it doesn't sense the context and it opens to the wrong Help window.&lt;br /&gt;&lt;br /&gt;There is a method that can be used to list out all of the document variables and their contents (&lt;a href="http://qlikviewmaven.blogspot.com/2008/11/listing-all-variables-and-contents.html" target="List Out Variables"&gt;&lt;i&gt;Click here to read about it&lt;/i&gt;&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5865337493088056639?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5865337493088056639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5865337493088056639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5865337493088056639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5865337493088056639'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/11/variable-overview.html' title='Variable Overview'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/SRbiaKMRpxI/AAAAAAAAAD4/l0X3N8azBds/s72-c/QM_blog_9.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6141830421637581587</id><published>2008-11-01T21:06:00.003-04:00</published><updated>2008-11-09T16:57:19.068-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Expression Overview</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/SQz-JKQmH6I/AAAAAAAAADw/t7ZQmy9OCeg/s1600-h/QM_blog_8.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5263861497815506850" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 200px; CURSOR: hand; HEIGHT: 174px" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/SQz-JKQmH6I/AAAAAAAAADw/t7ZQmy9OCeg/s200/QM_blog_8.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;If you work with moderately complex reports then you must be working with reports with expressions. Most of the time we're concerned with expressions in chart objects (the graphs or tables with dimensions) but there can be expresssions in many places in a QlikView document. An expression might control whether a tab or chart is visible or not or it might control colors used in a chart. An expression might be used in a text object to provide customized information or a warning, or it might be used in a chart title to provide a customized title. In version 6 the only way to maintain these expressions was to remember where they are and open up each object to check on specific expressions.&lt;br /&gt;&lt;br /&gt;In recent releases of QlikView there's a great feature called the &lt;em&gt;Expression Overview&lt;/em&gt;. To see it, select &lt;strong&gt;Properties-&gt;Expression Overview&lt;/strong&gt; (or, hold down the &lt;em&gt;ctrl&lt;/em&gt; &lt;em&gt;key&lt;/em&gt;, the &lt;em&gt;alt key&lt;/em&gt; and the &lt;em&gt;E&lt;/em&gt; key at the same time). This overview shows you where the expressions are in your document, it can show you the text of the expression, it will allow you make changes to the expression, you can search for specific text in the expressions like a field name or variable name, and you can do mass changes with the search and replace functionality.&lt;br /&gt;&lt;br /&gt;There's no &lt;em&gt;HELP button&lt;/em&gt; but you can make the Expression Overview Help screen appear if you press your &lt;strong&gt;F1&lt;/strong&gt; button. The Help screen will explain the available functions.&lt;br /&gt;&lt;br /&gt;As always, if you are going to make serious changes to a document it's a good idea to make a backup copy of the document first, just in case you make a mistake and want to restore the document back the way it was.&lt;br /&gt;&lt;br /&gt;My own preference, when I want to search for a particular kind of expression or if I just want to review all of the expressions in a report looking for problems and opportunities is to use the &lt;em&gt;Export&lt;/em&gt; button to export all of the Expression Overview data. A box will appear asking for the pathname to use for the exported text file. The text file is a tab-delimited text file that can be reviewed with Notepad or Wordpad or a spreadsheet (or loaded into QlikView!).&lt;br /&gt;&lt;br /&gt;The exported Expression Overview text file makes an excellent addition to documentation for a complex report for those of you who are required to produce documentation.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6141830421637581587?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6141830421637581587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6141830421637581587' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6141830421637581587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6141830421637581587'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/11/expression-overview.html' title='Expression Overview'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/SQz-JKQmH6I/AAAAAAAAADw/t7ZQmy9OCeg/s72-c/QM_blog_8.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-6111240653230514444</id><published>2008-10-03T16:53:00.004-04:00</published><updated>2008-10-04T11:51:37.705-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expression'/><title type='text'>Expression Knows Which Cycle Group Field is Active</title><content type='html'>Someday you may have a chart like this: there's a cycle group in the chart dimension and all of the expressions work great except that one expression needs to work differently when one particular field of the cycle group is active. Here's an example-- your chart for current month sales is working ok but the expression for allocated sales revenue must work differently when the cycle group field &lt;em&gt;Division&lt;/em&gt; is used. Maybe the accounting department has decreed that a complex, ever changing formula must be used to show allocated sales revenue by &lt;em&gt;Division&lt;/em&gt; so your report needs simply to show 'Not Defined' in the allocated sales revenue column when &lt;em&gt;Division&lt;/em&gt; is used for the dimension.&lt;br /&gt;You can write the expression something like this:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;If(GetCurrentField(CorpCycle)='Division','Not Defined',Sum(alloc_sales))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this example, &lt;em&gt;CorpCycle&lt;/em&gt; is the name of the cycle group. &lt;em&gt;Division &lt;/em&gt;is the name of the cycle group field. Use the actual field name not the label that might be used in the chart. If you're not familiar with using a cycle group in the chart dimension then it will be worth your time to find the reference manual or tutorial and read about it. Being able to change the chart dimension instantly with a mouse click is a powerful feature.&lt;br /&gt;&lt;br /&gt;If you build your expressions using the wizard available on the &lt;em&gt;Edit Expression&lt;/em&gt; window, you will find the &lt;em&gt;GetCurrentField&lt;/em&gt; function along with several other interesting functions listed under &lt;em&gt;System Functions&lt;/em&gt;.&lt;br /&gt;Another common place to use this function is in the chart title. For example, you might use this for a chart title:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;='CURRENT MONTH SALES SUMMARY BY ' &amp;amp; GetCurrentField(CorpCycle)&lt;br /&gt;&lt;/span&gt;That will use the currently active field name from the cycle group in the chart title. As a user clicks on the cycle group the chart title will automatically change along with the dimension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-6111240653230514444?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/6111240653230514444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=6111240653230514444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6111240653230514444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/6111240653230514444'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/10/expression-knows-which-cycle-group.html' title='Expression Knows Which Cycle Group Field is Active'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5372979381008531261</id><published>2008-09-27T11:52:00.007-04:00</published><updated>2010-07-26T13:32:23.555-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><title type='text'>Step Through Field Values</title><content type='html'>&lt;span style="color:#ff0000;"&gt;Author's Note: This blog posting is obsolete. There is a much easier way to accomplish this in QlikView without a macro&lt;/span&gt; (&lt;a href="http://qlikviewmaven.blogspot.com/2010/07/stepping-selection-through-each-value.html" target="Step Selection Through Field Values"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Often, when we're analyzing data we need to examine the tables and graphs on our QlikView report for each value of a field. For example, we might need to check on inventory values and forecast error separately for each warehouse location or maybe for each product category or maybe we need to look at the data separately for each month of the year. Here's something that helps with that process. Add a button to your report and name the button "Step Through Field Values". Then, add this macro to the module and associate it with the button:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SUB StepThroughValues&lt;br /&gt;'--------------------&lt;br /&gt;'Step through all the available values for a field&lt;br /&gt;'selecting each value one at a time&lt;br /&gt;fieldName=trim(inputbox("Enter a field to cycle through. (Case sensitive and spelling counts!)","Step Through Values","Material"))&lt;br /&gt;If fieldName="" then&lt;br /&gt;Exit sub&lt;br /&gt;End if&lt;br /&gt;Set val=ActiveDocument.Fields(fieldName).GetPossibleValues(20000)&lt;br /&gt;'Set val=activedocument.Fields(fieldName).GetSelectedValues(20000)&lt;br /&gt;For i=0 to val.Count-1&lt;br /&gt;ActiveDocument.Fields(fieldName).Select val.Item(i).Text&lt;br /&gt;returnval=msgbox(val.Item(i).Text&amp;amp;chr(13) &amp;amp; i+1 &amp;amp; " of " &amp;amp;val.Count &amp;amp; chr(13 )&amp;amp; chr(13)&amp;amp; "Click:" &amp;amp; chr(13) &amp;amp; " YES: to create Bookmark" &amp;amp; chr(13) &amp;amp; " NO: to move to next entry" &amp;amp; chr(13) &amp;amp; " CANCEL: to quit", 259, "Step Through Values")&lt;br /&gt;if returnval=2 then&lt;br /&gt;Exit For&lt;br /&gt;ElseIf returnval=6 then&lt;br /&gt;bmarkName=inputbox("Enter a Bookmark Name", "User Entry", "BookMark " &amp;amp; i+1 &amp;amp; ", " &amp;amp; fieldName &amp;amp; "=" &amp;amp; val.Item(i).Text)&lt;br /&gt;ActiveDocument.CreateDocBookmark false, bmarkName&lt;br /&gt;End if&lt;br /&gt;Next&lt;br /&gt;Activedocument.Fields(fieldName).Clear&lt;br /&gt;Set val=Nothing&lt;br /&gt;End sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I know that this blog format and your browser will be wrapping some of the lines in the macro and removing the indentation that I use to indicate code structure so be careful. You should be able to select and copy the code from your browser window and then paste it into the QlikView macro.&lt;br /&gt;&lt;br /&gt;When you click the button on your report a window will appear that asks you for the name of the field to step through. Use the actual field name that was loaded into QlikView. This is case sensitive and must be the correct field name spelling. The macro will then &lt;em&gt;select&lt;/em&gt; the first available value for the field and offer you the opportunity to create a bookmark for it. Click on &lt;strong&gt;No&lt;/strong&gt; to make the macro move on and &lt;em&gt;select&lt;/em&gt; the next possible value for the field. The bookmark is just to help you come back later and do further analysis. The macro could also be coded to write out a chart as a file or save a graph or do some other useful thing.&lt;br /&gt;&lt;br /&gt;Note that there's a commented out line in the macro that will make it step through each of the currently selected values for a field. If you prefer that functionality, just uncomment that line and comment out the previous line to make the button step through the selected values instead of all possible values. In either case, by the time you are finished with the button it will have worked with selections for the field so you may have to restore your original selections (or use the Back arrow to move back through selections).&lt;br /&gt;&lt;br /&gt;I hope you find the button useful. Please add a comment to this posting if you have any improvements or suggestions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5372979381008531261?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5372979381008531261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5372979381008531261' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5372979381008531261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5372979381008531261'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/step-through-field-values.html' title='Step Through Field Values'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2402445550311608791</id><published>2008-09-22T16:42:00.007-04:00</published><updated>2008-09-25T08:21:18.721-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Loading All of the Files from a Folder</title><content type='html'>It's pretty easy to load all of the files from a folder into QlikView. For example, if you have a number of Excel spreadsheets in the f:\Finance\monthly_summaries folder and each spreadsheet contains a tab named EOM_SHEET and the column names on that tab are consistent in each spreadsheet file then these lines in your loadscript will load all of the spreadsheets into your QlikView report:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Directory f:\Finance\monthly_summaries;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;For each ExcelFile in filelist ('*.xls')&lt;br /&gt;EOM_HISTORY:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Load * From $(ExcelFile) (biff, embedded labels, table is [EOM_SHEET$]);&lt;br /&gt;Next ExcelFile;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note that this looping through the files of the folder will only use filenames that end with a .xls extension. So, any other documentation or data files in the folder will be ignored. The spreadsheets can contain other worksheet tabs too -- only the worksheet tab named EOM_SHEET will be loaded into QlikView. Hundreds of spreadsheet files can be loaded fairly quickly this way. As always with QlikView object names spelling counts and it's case-sensitive, &lt;em&gt;e.g.&lt;/em&gt; &lt;u&gt;EOM_SHEET&lt;/u&gt; is not the same thing as &lt;u&gt;EOM_Sheet&lt;/u&gt;. If you're worried that not all of the spreadsheets use the same column headings then it might be best to code each column heading as a specific field name in the Load statement. That will make QlikView call it an error if the column headings in any of the spreadsheets don't match the expected field names. The error is usually better than loading inconsistent data. The &lt;em&gt;Directory&lt;/em&gt; statement and &lt;em&gt;Load&lt;/em&gt; statement can also make use of variables to make them more flexible to handle folder and file naming conventions. The load statement, of course, can be made to fit most situations with &lt;em&gt;Where&lt;/em&gt; clauses and &lt;em&gt;Group by&lt;/em&gt; options.&lt;br /&gt;&lt;br /&gt;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&lt;br /&gt;In a comment, Guido correctly pointed out that this syntax achieves the same result and it's simpler:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;EOM_HISTORY:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Load * From f:\Finance\monthly_summaries\*.xls (biff, embedded labels, table is [EOM_SHEET$]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Check out the other comments to this posting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2402445550311608791?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2402445550311608791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2402445550311608791' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2402445550311608791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2402445550311608791'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/loading-all-of-files-from-folder.html' title='Loading All of the Files from a Folder'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1843075221384510732</id><published>2008-09-20T09:20:00.008-04:00</published><updated>2008-09-23T13:12:36.951-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='field names'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><title type='text'>Fixing the Field Name in an Exported Bookmark File</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/SNT7ARhT7fI/AAAAAAAAADo/HckKf7PehEM/s1600-h/QM_blog_7.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248095447915163122" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/SNT7ARhT7fI/AAAAAAAAADo/HckKf7PehEM/s200/QM_blog_7.png" border="0" /&gt;&lt;/a&gt;Last month, I wrote about how useful bookmarks are because they can be exported as a file and then imported into different QlikView reports (&lt;a href="http://qlikviewmaven.blogspot.com/2008/08/best-thing-about-bookmarks.html" target="Bookmarks"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;). A problem you might run into from time to time is trying to use a bookmark file where the field name in the original report is different from the field name in the report where you want to import the bookmark. It's the same data but perhaps the field name in the original report was spelled differently. This kind of thing happens all the time when data is loaded into QlikView from spreadsheets. You can edit the bookmark file to fix that problem.&lt;br /&gt;&lt;br /&gt;Here's an example:&lt;br /&gt;Imagine that your co-worker, Kavya, in the Finance department has a QlikView report with all of the sales districts selected that will be used for the new product rollout. You could really use that bookmark for your project. She makes a bookmark of the selection and exports it and emails you the bookmark file, named &lt;em&gt;Rollout_districts.qbm&lt;/em&gt;. But, after you import the file and click the bookmark name and nothing is selected, you discover that Kavya named the field in her report &lt;em&gt;sls_district&lt;/em&gt; and in your report it is named &lt;em&gt;Sales_Districts&lt;/em&gt;. If either Kavya's report or your report could easily be reloaded then you might be able to fix the field name during the reload - OR - you can quickly edit the field name in the bookmark file and make it usable.&lt;br /&gt;Find the file (in this example, &lt;em&gt;Rollout_districts.qbm&lt;/em&gt;) in Windows Explorer. Right-click on the file and select &lt;strong&gt;Open With-&gt;Notepad&lt;/strong&gt;. The bookmark file is a kind of text data known as &lt;em&gt;XML&lt;/em&gt;. It's ok if you never heard of XML; you don't need to know anything about it for this process. In the Notepad window select &lt;strong&gt;Edit-&gt;Replace...&lt;/strong&gt; and when the Replace window opens type &lt;u&gt;&lt;em&gt;sls_district&lt;/em&gt;&lt;/u&gt; in the &lt;strong&gt;Find What:&lt;/strong&gt; field box and type &lt;u&gt;&lt;em&gt;Sales_Districts&lt;/em&gt;&lt;/u&gt; in the &lt;strong&gt;Replace With:&lt;/strong&gt; box (*See the diagram at the top of this posting - click on it for a better view). Now, click the &lt;strong&gt;Replace All&lt;/strong&gt; button and then click &lt;strong&gt;Cancel&lt;/strong&gt; to close the Replace window. Click &lt;strong&gt;File-&gt;Save As&lt;/strong&gt; and save the bookmark file under a different name (just in case you need the original file again). Don't edit or change anything else in the bookmark file. Finally, import the new bookmark file into your report and you'll have the selections just as you wanted.&lt;br /&gt;&lt;br /&gt;For this process to work the way you want, of course, it must be the same kind of data in the fields in both the original report and the report being edited. You can't change a bookmark file of country names into a bookmark for movie titles just by editing the field name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1843075221384510732?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1843075221384510732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1843075221384510732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1843075221384510732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1843075221384510732'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/fixing-field-name-in-exported-bookmark.html' title='Fixing the Field Name in an Exported Bookmark 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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/SNT7ARhT7fI/AAAAAAAAADo/HckKf7PehEM/s72-c/QM_blog_7.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-8532308498201910757</id><published>2008-09-13T11:23:00.007-04:00</published><updated>2008-09-15T13:07:52.396-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><title type='text'>Automatic Concatenation Watch-Out</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_JRbXQI-qRP4/SMvc8g_Jy8I/AAAAAAAAADc/Dyd5WOWAcQ8/s1600-h/durn_cat.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5245529123208154050" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_JRbXQI-qRP4/SMvc8g_Jy8I/AAAAAAAAADc/Dyd5WOWAcQ8/s200/durn_cat.png" border="0" /&gt;&lt;/a&gt;This is a mistake I make every once in a while and it always puzzles me for a few minutes before I figure out what happened. In the loadscript, if you load data from several sources and use exactly the same field names then QlikView will automatically concatenate the data from the second source onto the table created for the first source. It does this unless you specify the keyword &lt;strong&gt;NOCONCATENATE&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Here's an example: Imagine that your loadscript loads data from a customer master table and following that you write two load statements to create a small table of just the Club customers and a second table of just the Military customers. Maybe you intend to use the small tables in a &lt;em&gt;Where Exists&lt;/em&gt; statement further down in the script. You might write the loadscript statements like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;CLUB_CUSTOMERS:&lt;br /&gt;Load customer_no&lt;br /&gt;Resident CUSTOMER_MASTER&lt;br /&gt;Where customer_type = 'CLUB';&lt;br /&gt;MILITARY_CUSTOMERS:&lt;br /&gt;Load customer_no&lt;br /&gt;Resident CUSTOMER_MASTER&lt;br /&gt;Where customer_type = 'MILITARY';&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;That's not going to work the way you intended. There's no error or warning but after the loading you'll discover that there is no MILITARY_CUSTOMERS table. What happened is that QlikView concatenated the customer_no values from the second load statement onto the CLUB_CUSTOMERS table. It did that because the field names in the second table are exactly the same as the field names from the first table. It will do this even if the two load statements are not one after the other like in my example but even if there are other loadscript statements in between. The automatic concatenation feature is probably useful in quickly assembled loadscripts but it can cause trouble for more complex applications. You could change the field name in the MILITARY_CUSTOMERS table to be different, like customer_no_military and the automatic concatenation won't happen. OR, and this is my preference, add the NOCONCATENATE keyword to the second load statement like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MILITARY_CUSTOMERS:&lt;br /&gt;Noconcatenate Load customer_no&lt;br /&gt;Resident CUSTOMER_MASTER&lt;br /&gt;Where customer_type = 'MILITARY';&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then you will end up with the two small tables that you intended.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another keyword, CONCATENATE, is sometimes useful when you want to load two sets of data where the fields are not exactly the same into the same table. When you use this one though it will concatenate the data being loaded to the previous table in the loadscript.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-8532308498201910757?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/8532308498201910757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=8532308498201910757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8532308498201910757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8532308498201910757'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/automatic-concatenation-watch-out.html' title='Automatic Concatenation Watch-Out'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRbXQI-qRP4/SMvc8g_Jy8I/AAAAAAAAADc/Dyd5WOWAcQ8/s72-c/durn_cat.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1919912372782021666</id><published>2008-09-11T13:33:00.004-04:00</published><updated>2008-09-11T13:56:19.979-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file size'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Reducing Report Size</title><content type='html'>In the previous posting I showed how a table in an existing report could be changed to make the table smaller (&lt;a href="http://qlikviewmaven.blogspot.com/2008/09/change-table-without-reloading-report.html" target="Changing an Existing Table"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;). In a comment to that posting, Rob Wunderlich correctly points out that a much simpler way to make the report smaller is to select the data you are interested in retaining and then, from the menu, select &lt;strong&gt;File-&gt;Reduce Data-&gt;Keep Possible Values&lt;/strong&gt;. Then save the report under a different name in case you ever want to refer to the original. Thanks for the comment, Rob. That technique is great for permanently removing data from a report for any reason, not just to make the report smaller (&lt;em&gt;e.g.&lt;/em&gt; removing old data, sensitive, irrelevant, unneeded, or erroneous data).&lt;br /&gt;&lt;br /&gt;The method shown in the previous posting for changing a table in an existing report is still useful for changing field values, adding or joining new fields, etc. Someday I'll have to edit that posting to a more relevant example.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1919912372782021666?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1919912372782021666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1919912372782021666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1919912372782021666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1919912372782021666'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/reducing-report-size.html' title='Reducing Report Size'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-8800600875955477743</id><published>2008-09-09T16:54:00.006-04:00</published><updated>2008-09-13T07:51:23.865-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='file size'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='partial reload'/><title type='text'>Change a Table Without Reloading Report</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SMbn7bZIWKI/AAAAAAAAADU/GpxRED39ACg/s1600-h/QM_blog_6.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5244133824270981282" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SMbn7bZIWKI/AAAAAAAAADU/GpxRED39ACg/s320/QM_blog_6.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Last month I wrote a posting about interesting things you can do in the loadscript with a &lt;em&gt;&lt;strong&gt;Partial Reload&lt;/strong&gt;&lt;/em&gt;. Here's another: &lt;/div&gt;&lt;br /&gt;&lt;div&gt;I had a large report that we needed as an example for a presentation but it was just too large. The original database it loaded from is no longer available, so I needed a way to make the report smaller without reloading it. It had one large shipment data table in it and I decided to change the the table to only include two shipping location codes which would make it much smaller.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;See the picture above (click it for a better view). I inserted this code at the top of the loadscript: &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;/* Example loadscript fragment to adjust a table */&lt;br /&gt;/* Put this code at the top of the loadscript and */&lt;br /&gt;/* then run a Partial Reload. */&lt;br /&gt;/* Remove this fragment after using it. */&lt;br /&gt;&lt;br /&gt;//Rename the table we want to change&lt;br /&gt;RENAME TABLE HIST TO HISTX;&lt;br /&gt;&lt;br /&gt;//Rebuild table with a WHERE clause&lt;br /&gt;HIST:&lt;br /&gt;ADD NOCONCATENATE LOAD * RESIDENT HISTX&lt;br /&gt;WHERE (LOC='001099') or (LOC='011098');&lt;br /&gt;&lt;br /&gt;// Drop the original table&lt;br /&gt;DROP TABLE HISTX;&lt;br /&gt;&lt;br /&gt;//so that we don't fall into the regular loadscript&lt;br /&gt;EXIT SCRIPT;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Then, I saved the report file under a different name (just in case) and ran a &lt;strong&gt;Partial Reload&lt;/strong&gt;. The Partial Reload executed the commands at the top of the loadscript without removing all of the other data and made the report file a lot smaller and the memory or RAM requirement for the report smaller too. Unless you know that you'll never need to reload the report again you should remove the loadscript lines you added at the top.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Don't forget the &lt;em&gt;ADD&lt;/em&gt; or the &lt;em&gt;NOCONCATENATE&lt;/em&gt; keywords or you'll find that the table you wanted to rebuild is missing after you run the Partial Reload.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-8800600875955477743?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/8800600875955477743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=8800600875955477743' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8800600875955477743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8800600875955477743'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/change-table-without-reloading-report.html' title='Change a Table Without Reloading Report'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/SMbn7bZIWKI/AAAAAAAAADU/GpxRED39ACg/s72-c/QM_blog_6.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5498850563407062110</id><published>2008-09-06T10:10:00.007-04:00</published><updated>2008-09-06T10:32:49.295-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Checking for Loadscript Errors from the Macro code</title><content type='html'>If you are using the macro code &lt;em&gt;Reload&lt;/em&gt; method to load data into your QlikView report you can also easily check for any loading errors. Here's an example of how that could be done. Add a small subroutine to the macro code that can check the system variable for error count like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Sub Check_for_errors()&lt;br /&gt;'---------------------&lt;br /&gt;'See if any load script errors occurred and report them&lt;br /&gt;alarm_flag = 0&lt;br /&gt;Set objvar = ActiveDocument.Variables("ScriptErrorCount")&lt;br /&gt;If trim(objvar.GetContent.String) = "0" then&lt;br /&gt;&amp;nbsp;&amp;nbsp;'No error - hooray&lt;br /&gt;&amp;nbsp;&amp;nbsp;Exit Sub&lt;br /&gt;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;alarm_flag = 1&lt;br /&gt;'Here you can add any other error notification&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;And then, in the subroutine that reloads the document code add an &lt;em&gt;IF&lt;/em&gt; statement after the &lt;em&gt;.Reload&lt;/em&gt; method something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ActiveDocument.Reload&lt;br /&gt;Check_for_errors 'call Check_for_errors subroutine&lt;br /&gt;If alarm_flag = 1 then 'an error happened in the loadscript&lt;br /&gt;&amp;nbsp;&amp;nbsp;ActiveDocument.CloseDoc&lt;br /&gt;&amp;nbsp;&amp;nbsp;ActiveDocument.GetApplication.Quit&lt;br /&gt;&amp;nbsp;&amp;nbsp;'***Exit Function or Exit Sub&lt;br /&gt;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In the reports I've developed there is error checking every step of the way and any error causes a notification file to be written out. If you have an email client program on the computer where the report is reloading then consider using an email notification to the report users or to a technical support person. I've sometimes sent a small notification email message to my cell phone &lt;em&gt;(&lt;/em&gt;My favorite message is &lt;em&gt;"&lt;a href="http://en.wikipedia.org/wiki/Lassie" target="Lassie"&gt;Lassie,&lt;/a&gt; go for help!")&lt;/em&gt; so that I can be notified immediately with the bad news.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5498850563407062110?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5498850563407062110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5498850563407062110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5498850563407062110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5498850563407062110'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/checking-for-loadscript-errors-from.html' title='Checking for Loadscript Errors from the Macro code'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3802438452861189257</id><published>2008-09-04T18:05:00.009-04:00</published><updated>2008-09-05T20:27:54.762-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='command line'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='.bat script'/><title type='text'>Checking for errors when a report reloads automatically</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_JRbXQI-qRP4/SMBhOA2kEOI/AAAAAAAAACs/7dLULTWeCJw/s1600-h/QM_blog_5.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5242296859634176226" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_JRbXQI-qRP4/SMBhOA2kEOI/AAAAAAAAACs/7dLULTWeCJw/s320/QM_blog_5.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;In a recent posting (&lt;a href="http://qlikviewmaven.blogspot.com/2008/08/qlikview-command-line-and-automation.html" target="QlikView Automation"&gt;&lt;i&gt;Click here to read it&lt;/i&gt;&lt;/a&gt;) we discussed ways to run QlikView from the command line as part of an automated script process. If you run the reload process automatically then you're faced with an issue: what should happen if an error occurs during the reload? Even a report that has reloaded successfully dozens of times before can run into an error if a file is missing or the database is down or if someone changed the title on a spreadsheet column (that's the one I seem to trip over most often).&lt;br /&gt;If you're going to sit at your desk in front of the computer and watch it run then you don't have to do anything -- any loadscript error window that opens up can be clicked and the report can be cancelled if necessary. But, if the report is going to load unattended without anyone watching then consider these actions:&lt;br /&gt;&lt;br /&gt;Check the Generate Logfile box on the General tab of the Document Properties window (select &lt;strong&gt;Settings-&gt;Document Properties&lt;/strong&gt; from the menu - see the picture above). This is often a good idea whether you are reloading the report automatically or not. It causes QlikView to generate a text file audit trail of what happens as the loadscript runs. It captures the number of rows returned from queries and which branch an IF statement takes, it shows the expanded value of document variables that are used in commands and expressions and it shows the date and time for each command which allows you to analyze the slow-running parts of the loadscript. The logfile will be named just like the report file but with a ".log" added to the end. For example, if your report file is named Prior_Yr_Sales.qvw then the log file will be named Prior_Yr_Sales.qvw.log and it will be stored in the same folder as the report file. Open the log file with Windows Notepad or Wordpad. You can search for errors in the log file by using the Notepad or Wordpad Search function and search for &lt;strong&gt;&lt;u&gt;Error:&lt;/u&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;For a report that must reload unattended (with no human folk watching) add this line to the top of your loadscript:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;SET ErrorMode=0;&lt;br /&gt;&lt;/span&gt;That will tell QlikView not to open a loadscript error window when an error occurs (which would wait for someone to click &lt;strong&gt;OK&lt;/strong&gt;). Instead the loadscript will go through all of the commands and do the best it can to execute all of them.&lt;br /&gt;&lt;br /&gt;From your .bat or .cmd script you can have the script search for any lines containing the text &lt;strong&gt;&lt;u&gt;Error:&lt;/u&gt;&lt;/strong&gt; and perform an action if it is found. Here's an example:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;rem Initialize the log file with xxx&lt;br /&gt;echo xxx &gt; c:\RPTS\Inventory.qvw.log&lt;br /&gt;rem Now, run QlikView and reload&lt;br /&gt;"c:\Program\QV.exe" /r /vbatch_flag=1 c:\RPTS\Inventory.qvw&lt;br /&gt;rem Look through the log file and write&lt;br /&gt;rem a note to Joe if we find an error&lt;br /&gt;Type c:\RPTS\Inventory.qvw.log Find /c "Error:"&lt;br /&gt;If errorlevel 1 echo %date% %time% "Error occurred" &gt;&gt; c:\Notify_Joe.txt&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3802438452861189257?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3802438452861189257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3802438452861189257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3802438452861189257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3802438452861189257'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/checking-for-errors-when-report-reloads.html' title='Checking for errors when a report reloads automatically'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRbXQI-qRP4/SMBhOA2kEOI/AAAAAAAAACs/7dLULTWeCJw/s72-c/QM_blog_5.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5897008367857287536</id><published>2008-09-02T17:26:00.015-04:00</published><updated>2009-04-11T17:14:06.089-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogs'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><title type='text'>Other QlikView Tutorial Blogs</title><content type='html'>Some links to other QlikView oriented blogs with a tutorial flavor:&lt;br /&gt;&lt;br /&gt;Good info on QlikView document variables and the difference between &lt;em&gt;Set&lt;/em&gt; and &lt;em&gt;Let&lt;/em&gt; in the loadscript: &lt;a href="http://michaelellerbeck.com/2008/08/29/qlikview-variables/" target="QV Variables"&gt;http://michaelellerbeck.com/2008/08/29/qlikview-variables/&lt;/a&gt;&lt;br /&gt;Some others by the same author:&lt;br /&gt;&lt;a href="http://michaelellerbeck.com/2008/08/22/qlikview-synthetic-keys/" target="Synthetic Keys"&gt;http://michaelellerbeck.com/2008/08/22/qlikview-synthetic-keys/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://michaelellerbeck.com/2008/04/18/qlikview-enterprise-datetime-subtraction/" target="DateTime Subtraction"&gt;http://michaelellerbeck.com/2008/04/18/qlikview-enterprise-datetime-subtraction/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Link to a QlikView oriented blog containing some good info:&lt;br /&gt;&lt;a href="http://qlikviewidiot.blogspot.com/" target="qlikviewidiot blog"&gt;http://qlikviewidiot.blogspot.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Good technical info here:&lt;br /&gt;&lt;a href="http://qlikviewnotes.blogspot.com/" target="qlikviewnotes blog"&gt;http://qlikviewnotes.blogspot.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Gilles broad spectrum look at QlikView:&lt;br /&gt;&lt;a href="http://www.quickqlearqool.nl?" target="Quick - Qlear - Qool"&gt;Quick - Qlear - Qool&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I added a gadget that shows links to QlikView oriented blogs that should show up on the right-hand side of the window. It uses a Google search of blogs so I hope it shows recently updated and current information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5897008367857287536?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5897008367857287536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5897008367857287536' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5897008367857287536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5897008367857287536'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/09/variables.html' title='Other QlikView Tutorial Blogs'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-2575056436998057582</id><published>2008-08-31T17:30:00.009-04:00</published><updated>2008-09-02T14:15:13.044-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='automation'/><category scheme='http://www.blogger.com/atom/ns#' term='command line'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><category scheme='http://www.blogger.com/atom/ns#' term='.bat script'/><title type='text'>QlikView Command Line and Automation</title><content type='html'>This posting is for the more technically inclined among you and developers who work with reports that must reload automatically.&lt;br /&gt;&lt;br /&gt;You can run QlikView from the command line. You've probably created shortcuts on your desktop to various useful QV reports. In that kind of shortcut the command is simply the complete pathname to the report file. That will also work in a .bat or .cmd file; just enter a usable pathname to the report file and Windows will open QlikView for the report.&lt;br /&gt;More interesting things can be done with a command that includes the pathname to the QlikView program followed by a pathname to the report file. This command line syntax allows you to enter switches or parameters. The command line syntax is covered pretty well in the reference manual. For example: If the pathname to your QlikView program is c:\Program Files\QlikView\QV.exe and the report you want to open is c:\reports\Inventory.qvw then this line will do a simple open of the report in a shortcut or .bat or .cmd file:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;"c:\Program Files\QlikView\QV.exe" c:\reports\Inventory.qvw&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You may or may not need the quotes around the pathname for QV.exe or for your report file. Windows usually wants to have the quotes for any pathname containing a blank or special character.&lt;br /&gt;&lt;br /&gt;If you add a &lt;strong&gt;/r&lt;/strong&gt; switch (notice the front-leaning slash) then the command will open the report, run the reload function (executing the loadscript), and then save and close the report:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;"c:\Program Files\QlikView\QV.exe" /r c:\reports\Inventory.qvw&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;A &lt;strong&gt;/rp&lt;/strong&gt; will do something similar except it runs the partial reload function.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;/l&lt;/strong&gt; switch (that's a lower case &lt;em&gt;ell&lt;/em&gt;) will open the report, run the reload function and leave the report open. This one can be useful as a desktop shortcut:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;"c:\Program Files\QlikView\QV.exe" /r c:\reports\Inventory.qvw&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A &lt;strong&gt;/p&lt;/strong&gt; switch will open the report, run a partial reload and then leave the report open.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;/v&lt;/strong&gt; switch can be used to pass a document variable value into the report. It can be used either with or without the switches described above. The document variable might be used in macro module code or in the loadscript. In our example if we want to reload the QV report and pass in the document variable &lt;em&gt;batch_flag&lt;/em&gt; with a value of &lt;em&gt;1 &lt;/em&gt;then we'd use a command like this:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;"c:\Program Files\QlikView\QV.exe" /r /vbatch_flag=1 c:\reports\Inventory.qvw&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);font-family:arial;font-size:78%;"  &gt;[The previous line and all of the previous command line examples are intended to be a single line even if your browser is breaking them into two lines]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We often use a command like that for reports that work differently when they are executed in batch versus being opened by a user.&lt;br /&gt;&lt;br /&gt;My personal favorite way to use the command line syntax is from a VBScript file (.vbs script) on the Windows PC. VBScript allows me more flexibility in automatically figuring out which report file to run and what kind of document variable values should be passed in. From the VBScript file the syntax might look something like this: (using the same example)&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Set objShell = CreateObject("WScript.Shell")&lt;br /&gt;objShell.Run """c:\Program Files\QlikView\QV.exe"" /r /vbatch_flag=1 c:\reports\Inventory.qvw"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);font-family:arial;font-size:78%;"  &gt;[Set objshell... is a single line and objShell.Run... is the second line no matter how your browser is breaking them up]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In addition to filenames using drive letters you can use network file names like this:&lt;span style=";font-family:courier new;font-size:85%;"  &gt; \\canserver\projects\reports\Inventory.qvw&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-2575056436998057582?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/2575056436998057582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=2575056436998057582' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2575056436998057582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/2575056436998057582'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/qlikview-command-line-and-automation.html' title='QlikView Command Line and Automation'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-8863069964275636001</id><published>2008-08-28T21:50:00.008-04:00</published><updated>2008-08-29T12:38:22.987-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>VBScript in Loadscript and Module</title><content type='html'>The language used in both the QlikView loadscript and in the module code (macros) is modified VBScript. You can easily find information about VBScript commands and syntax through Google. For example, to find information about msgbox prompts and syntax enter this in Google:&lt;br /&gt;  &lt;span style="font-family:courier new;"&gt;vbscript tutorial msgbox&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-8863069964275636001?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/8863069964275636001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=8863069964275636001' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8863069964275636001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/8863069964275636001'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/vbscript-in-loadscript-and-module.html' title='VBScript in Loadscript and Module'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-3431127660595322504</id><published>2008-08-26T14:28:00.000-04:00</published><updated>2008-08-26T14:32:31.084-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><title type='text'>The best thing about Bookmarks</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SLRLYGenGMI/AAAAAAAAACE/tqfx3ufDgmA/s1600-h/QM_blog_4.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5238895143966677186" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SLRLYGenGMI/AAAAAAAAACE/tqfx3ufDgmA/s200/QM_blog_4.png" border="0" /&gt;&lt;/a&gt;Many QlikView users don't make much use of the Bookmark feature. The Bookmark feature lets you save your current selections and give it a name so that you can easily recreate those selections later.&lt;br /&gt;&lt;br /&gt;I have found the most useful part of bookmarks is that they can be exported as a little file. Then the little file can be imported back in to the report tomorrow or it can be imported into a different report. We have quite a few reports that include the field name, ITEM, which is a product identifier. Quite often, I have a selection of several ITEM values from one report that I'd like to see as a selection in a different report. I can just make a bookmark, export the bookmark, and then import the bookmark file into a different report and have those same ITEM values selected. If there are any field selections from the first report that don't make sense in the second report because the fields so not exist they are just ignored.&lt;br /&gt;&lt;br /&gt;Sometimes a co-worker will send me a spreadsheet of data that requires further analysis. I can quickly import that spreadsheet into a new temporary QlikView report, select the ITEM values to be investigated, make a bookmark and export it. Now, I can import that bookmark file into one of our comprehensive QlikView reports and review data for the ITEM values from the spreadsheet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-3431127660595322504?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/3431127660595322504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=3431127660595322504' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3431127660595322504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/3431127660595322504'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/best-thing-about-bookmarks.html' title='The best thing about Bookmarks'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/SLRLYGenGMI/AAAAAAAAACE/tqfx3ufDgmA/s72-c/QM_blog_4.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1915626502982586179</id><published>2008-08-24T11:55:00.001-04:00</published><updated>2008-12-07T09:55:40.074-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='copy chart'/><category scheme='http://www.blogger.com/atom/ns#' term='sheet object'/><title type='text'>Copying a Chart From One Report to Another</title><content type='html'>Sometimes you want to copy a sheet object from one QlikView report to another. You might have two reports; say one for the finance department and a separate report for the supply chain department that both load similar data from the database. If the supply chain analyst develops a really great chart for the supply chain report and the people in finance could use it then you could copy the chart from the supply chain report to the finance report. You could always just recreate the chart from scratch on the new report of course, but it is easy to copy the chart from one report to another using Windows clipboard. Here’s how it could be done using our example:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Open both reports&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Make a back-up copy of the "finance report" (the one you are going to change) by doing a save-as under a different name&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Now, go to the supply chain report that has the cool chart. You could use the &lt;strong&gt;Window&lt;/strong&gt; menu to select the other report. Click on the chart so that the chart is selected (when the chart is selected the title bar at the top of the chart changes color).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Select &lt;strong&gt;Edit-&gt;Copy&lt;/strong&gt; from the menu&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Switch over to the report you are going to change, the "finance report" in this example. Make sure you are looking at the finance report and select the tab where you want the chart to appear&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Select &lt;strong&gt;Edit-&gt;Paste&lt;/strong&gt; from the menu and the cool chart will get pasted into the finance report. It will appear in approximately the same position on the sheet that it occupied on the original report.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Finish up by moving the chart to the position you want, make any required changes to chart properties (like data field names or title, etc.) and save the changed report&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;You can use this method to past a sheet object into several different reports or paste the same sheet object into multiple tabs on the same report. I use this method all the time when developing a new report with multiple tabs.&lt;br /&gt;&lt;br /&gt;Another method that can be used to copy a chart within a single report is to click on the chart, select &lt;strong&gt;Properties&lt;/strong&gt;, and then select &lt;strong&gt;Clone&lt;/strong&gt;. A copy of the chart will appear just slightly offset from the original one. You can use your mouse to drag the cloned chart either to a new position on the same tab or drag it to one of the other tabs at the top of the report and, when you see the curved arrow appear, release the mouse button and the chart will now be on the other tab.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1915626502982586179?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1915626502982586179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1915626502982586179' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1915626502982586179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1915626502982586179'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/copying-chart-from-one-report-to.html' title='Copying a Chart From One Report to Another'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5228232352961767908</id><published>2008-08-24T08:54:00.001-04:00</published><updated>2009-02-04T15:41:19.059-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reference manual'/><title type='text'>QlikView Reference Manual</title><content type='html'>A co-worker, one of the newer guys, asked me a question about QlikView the other day. He had an old copy of the QV reference manual displayed on his laptop. “Where did you get that?”, I asked. “That’s the manual they gave me when my laptop was set up”, he replied. As the Greek poet Homer said, &lt;em&gt;“D’oh!”.&lt;/em&gt; I can’t use the general-purpose consultant answer &lt;a href="http://dictionary.reference.com/browse/RTFM/" target="RTFM"&gt;RTFM&lt;/a&gt; if the user’s FM is two versions old!&lt;br /&gt;&lt;br /&gt;You may already have a current reference manual on your PC. If you installed the full version of QlikView then the reference manual corresponding to your version of QlikView can be found in the same folder as the QlikView software programs (typically, c:\program files\qlikview). If the manual isn’t there, consider re-installing QlikView and this time specify the full installation. If you are in a corporate environment and your I.T. group can’t or won’t provide a QV reference manual then you can find one on the QlikView website, &lt;a href="http://qliktech.com/" target="QlikTech"&gt;qliktech.com&lt;/a&gt;; you’ll have to register for QlikCommunity in order to access the reference materials. A visit to the website is worthwhile whether you need a new reference manual or not – I’m sure you’ll find something interesting.&lt;br /&gt;&lt;br /&gt;Also check out this more recent posting about QlikView help: (&lt;a href="http://qlikviewmaven.blogspot.com/2008/12/qlikview-tutorial.html" target="QlikView Tutorial"&gt;&lt;i&gt;QlikView Tutorial&lt;/i&gt;&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The reference manual can’t be read like a novel but search for a topic whenever you feel you’d like to know more and you’ll become more proficient with data analysis. If (like most) you are not a manual reader then you can generally find answers to your questions through the &lt;em&gt;Help&lt;/em&gt; text available throughout the QlikView application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5228232352961767908?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5228232352961767908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5228232352961767908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5228232352961767908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5228232352961767908'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/qlikview-reference-manual.html' title='QlikView Reference Manual'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-5496222981783302336</id><published>2008-08-23T09:30:00.001-04:00</published><updated>2008-09-10T10:13:10.061-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='field names'/><category scheme='http://www.blogger.com/atom/ns#' term='qvw'/><category scheme='http://www.blogger.com/atom/ns#' term='file size'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='data compression'/><title type='text'>Field names and compressing data</title><content type='html'>One of the cool things about QlikView is the way it can store enormous amounts of data in the report file. It can load many millions of rows of data into a report file that might only be one or two MB in size. It compresses data so well that I seldom zip a report file before sharing it since the data is stored so densely in the QV report that zipping the file doesn't give much of a savings. If you are working with loading very large tables into a report be aware that part of the QV strategy for compressing data depends on not actually storing duplicate values in a field. If the report loads sales order data, for example, and the data contains customer name then there may be many duplicate values in the data for any customer who has ordered many times. QV will only store the customer name once and then keep track of where that customer name is used again as subsequent rows are loaded.&lt;br /&gt;&lt;br /&gt;This mechanism means that if you load two different tables from your database that contain customer name into two different QV tables and if the field name is the same for both QV tables then each customer name value is only stored once. But, if you give the field a different name in each QV table then the program cannot know that it is the same data and it must treat each field separately and many customer name values will be stored twice. This is really only a consideration when working with enormous tables where the sheer size of the tables is affecting memory utilization of the report or the size of the report file.&lt;br /&gt;&lt;br /&gt;Remember that QV relates or joins the tables together based on the fields they have in common. Two QV tables that both contain the field &lt;em&gt;Customer_Name&lt;/em&gt; will be related based on that field. So, sometimes making the field names in the tables the same to be more efficient with memory utilization will not be possible if it causes two tables to be joined when they shouldn’t (the joining of tables also consumes memory space). And the field names should only be the same if the field data is truly the same. Customer number from your company’s database is not the same as customer number from another company’s database. But, customer number from your company’s 2006 sales data is probably the same as customer number from the 2007 sales data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-5496222981783302336?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/5496222981783302336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=5496222981783302336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5496222981783302336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/5496222981783302336'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/field-names-and-compressing-data.html' title='Field names and compressing data'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-7797380628407793024</id><published>2008-08-21T18:10:00.000-04:00</published><updated>2008-08-23T10:03:02.381-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dimension'/><category scheme='http://www.blogger.com/atom/ns#' term='weekstart'/><title type='text'>Changing Daily Data to Weekly in a Chart</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_JRbXQI-qRP4/SK3omE8cnXI/AAAAAAAAAB0/NCjgjpVDL1M/s1600-h/QM_blog_3.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5237097682561703282" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_JRbXQI-qRP4/SK3omE8cnXI/AAAAAAAAAB0/NCjgjpVDL1M/s400/QM_blog_3.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I got a call earlier today from an analyst who had a QlikView report loaded with detailed shipment data. The main chart on the report showed shipment totals by day but the analyst needed the chart to show weekly quantities -- "is there a way to make it show the weekly data?"&lt;br /&gt;&lt;br /&gt;"Well, you're in luck. Not only can it be done but you can do it yourself in a few minutes." Follow these steps:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Open the QlikView report and save a copy of your report under a different name by selecting &lt;strong&gt;File-&gt;Save As&lt;/strong&gt; from the menu (just in case I give you bogus instructions that don't work... it happens).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Right-click on the chart that shows the daily data. Select &lt;em&gt;Properties&lt;/em&gt; and select the &lt;em&gt;Dimensions&lt;/em&gt; tab. It might look like the diagram above. &lt;span style="font-size:85%;color:#990000;"&gt;[Click on that diagram to make it bigger and get a better view]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You'll see a SHIPDATE entry in the &lt;em&gt;Used Dimensions&lt;/em&gt; window. Click on it and then click the &lt;em&gt;Remove&lt;/em&gt; button &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Now, click on &lt;em&gt;Add Calculated Dimension...&lt;/em&gt; the Edit Expression window opens up. We're going to add an expression that yields a weekly date to replace SHIPDATE. Type in this expression:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;WeekStart(SHIPDATE)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to close the Edit Expression window&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Give our new dimension a name- type &lt;span style="color:#6633ff;"&gt;WEEK&lt;/span&gt; in the field name box. See how it might look in the diagram below.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to close the Chart Properties window &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SK3oWhmIkTI/AAAAAAAAABs/RPTk7VqNl94/s1600-h/QM_blog_2.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5237097415374836018" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SK3oWhmIkTI/AAAAAAAAABs/RPTk7VqNl94/s400/QM_blog_2.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now the chart shows data by WEEK instead of SHIPDATE. This same method can be used for other types of date conversion functions or most other kinds of numeric or text string calculations. It lets you use a chart dimension even though the dimension data doesn't actually exist that way in the loaded data.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-7797380628407793024?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/7797380628407793024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=7797380628407793024' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7797380628407793024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7797380628407793024'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/changing-daily-data-to-weekly-in-chart.html' title='Changing Daily Data to Weekly in a Chart'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRbXQI-qRP4/SK3omE8cnXI/AAAAAAAAAB0/NCjgjpVDL1M/s72-c/QM_blog_3.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-7592866602542443986</id><published>2008-08-20T17:43:00.000-04:00</published><updated>2008-08-27T16:02:40.482-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='table names'/><category scheme='http://www.blogger.com/atom/ns#' term='field names'/><category scheme='http://www.blogger.com/atom/ns#' term='partial reload'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>More you can do with Partial Reload</title><content type='html'>See the previous posting about removing tables. In the same way that you can enter a &lt;em&gt;Drop Table&lt;/em&gt; command to remove a QlikView table from an existing report, you can enter these commands which will affect the existing report already loaded with data:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To remove a field from every QlikView table in which it appears, enter &lt;em&gt;Drop Column;&lt;/em&gt;&lt;br /&gt;For example, for privacy reasons you might want to get rid of social security number data in your report before sharing it with your team. You might enter:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Drop Field Customer_SSN; &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To remove a field from specific table(s), for example, you might enter:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Drop Fields Customer_Name, Customer_SSN from CUST_MSTR_TABLE, ORDER_HDR_TBL; &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To change the name of a column or field in every table in which it appears enter &lt;em&gt;Rename Field;&lt;/em&gt; (remember that the field names are how QlikView relates or "joins" the tables together so this one affects that table relationship).&lt;br /&gt;For example, you might enter:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Rename Field domestic_custno to North_America_Customer; &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You can change the name of an existing table. For example, you might enter:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Rename table domestic_sales to North_America_Sales; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;All of these commands can also be used in the loadscript during a normal load but they can be especially useful for fixing issues when used with an existing report that is already loaded with data. Remember to put them at the top of the loadscript, add an &lt;em&gt;Exit Script;&lt;/em&gt; command and then execute the commands with the &lt;em&gt;Partial Reload&lt;/em&gt;. The rename commands can be used with a mapping table if you think you might need more powerful renaming capabilities. Refer to the Help Text or Reference Manual for info about how to use a mapping table for renaming fields and tables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-7592866602542443986?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/7592866602542443986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=7592866602542443986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7592866602542443986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/7592866602542443986'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/see-previous-posting-about-removing.html' title='More you can do with &lt;i&gt;Partial Reload&lt;/i&gt;'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3174073825360154810.post-1691963033302298403</id><published>2008-08-20T13:54:00.001-04:00</published><updated>2008-08-27T16:01:39.118-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadscript'/><category scheme='http://www.blogger.com/atom/ns#' term='drop table'/><category scheme='http://www.blogger.com/atom/ns#' term='partial reload'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>How to remove an existing table</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_JRbXQI-qRP4/SKxbUX5S-vI/AAAAAAAAAAw/_iV-a6g7KOQ/s1600-h/QM_blog_1.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5236660872294890226" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_JRbXQI-qRP4/SKxbUX5S-vI/AAAAAAAAAAw/_iV-a6g7KOQ/s320/QM_blog_1.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;For this first blog entry we'll talk about something simple although maybe not a beginner's task. How do you remove a QlikView table from an existing report that is already loaded with data? There's a variety of reasons you might do something like that: to remove a large table and reduce the size of the report, maybe the data in one table is incorrect or causes incorrect results in the charts, or maybe you intend to share the report with Marcy in Finance and she just doesn't need to see the sales forecast. Whatever the reason, it is fairly easy to remove a table.&lt;br /&gt;&lt;br /&gt;First, make a copy of the report you are going to change so that you can restore the report in case something goes wrong or you make a mistake (it happens). Open the report, then select &lt;strong&gt;File-&gt;Edit Script&lt;/strong&gt; from the menu. It will open the loadscript edit window. Insert a few blank lines at the very top. Now type in a drop table command for the table you want to remove. For example, if you want to remove the NEW_ORDERS table then type in&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;DROP TABLE NEW_ORDERS;&lt;br /&gt;EXIT SCRIPT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Don't forget the semi-colons at the end of those lines. It might look something like the picture up above.&lt;br /&gt;&lt;br /&gt;After you type the new lines in the loadscript, review the lines to make sure everything is spelled correctly and click on the &lt;strong&gt;OK&lt;/strong&gt; button to close the edit loadscript window and then select &lt;strong&gt;File-&gt;Partial Reload&lt;/strong&gt; from the menu. The partial reload choice will execute your new loadscript lines down to the &lt;em&gt;Exit script&lt;/em&gt; line and then stop. The NEW_ORDERS table has now been removed from the report. If you ever expect to reload the report again you should edit the loadscript again and remove the new lines you just inserted. Then click &lt;strong&gt;OK&lt;/strong&gt; to close the edit loadscript window and &lt;strong&gt;Save&lt;/strong&gt; the report (or do a &lt;strong&gt;Save As&lt;/strong&gt; to save the report under a different file name).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3174073825360154810-1691963033302298403?l=qlikviewmaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qlikviewmaven.blogspot.com/feeds/1691963033302298403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3174073825360154810&amp;postID=1691963033302298403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1691963033302298403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3174073825360154810/posts/default/1691963033302298403'/><link rel='alternate' type='text/html' href='http://qlikviewmaven.blogspot.com/2008/08/how-to-remove-existing-table.html' title='How to remove an existing table'/><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='21' height='32' src='http://3.bp.blogspot.com/-Zr4AzD2N4zE/TiiOk5sBu0I/AAAAAAAADbo/X10bEFXbctA/s220/Tim_closer_than_he_appears.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRbXQI-qRP4/SKxbUX5S-vI/AAAAAAAAAAw/_iV-a6g7KOQ/s72-c/QM_blog_1.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
