<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Direct Discovery in Brasil</title>
    <link>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470231#M54223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1 style="color: black; font-weight: normal; margin: 0 0 0.25em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #aaaaaa; font-size: 1.8em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;Introduction&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;By default, QlikView will load all data available directly to main memory based on scheduled tasks or manual actions for reload data. All calculation made to answer user navigation get data from memory where read process is very fast. As all know, QlikView/Qlik Sense has a very smart process to compact the data and use memory resources efficiently. However, &lt;STRONG&gt;sometimes data needs to be analysed as soon new records are inserted or updated from database&lt;/STRONG&gt;. Of course is possible to reload data in short intervals, but depends how much data should be loaded.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;When a lot of tables and data will be read again in very short intervals, is possible have no time enough between each reload procedure to maintain the dashboard updated. That is why the QlikView has the ability to get data directly from data sources every time a user interact with objects. The concept here is named Direct Discovery. This resource is used to get all measures directly from databases while maintaining dimensions loaded in memory. &lt;STRONG&gt;So, from this perspective, QlikView will work using a hybrid mode&lt;/STRONG&gt;. That mean, &lt;STRONG&gt;a portion of data is loaded to memory while other one is got from databases&lt;/STRONG&gt; (datasources) &lt;STRONG&gt;every single time users interact with dashboards&lt;/STRONG&gt;.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;This post will teach you how to implement Direct Discovery through &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Direct Query&lt;/CODE&gt; instruction, that should be used at script level. Instead of use a traditional SQL SELECT instruction, use &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Direct Query&lt;/CODE&gt; command to tell to QlikView get part of data from database to memory while other part will remain at datasource. The basic syntax for this instruction is shown below:&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;
&lt;P&gt;&lt;SPAN style="color: blue;"&gt;DIRECT QUERY &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIMENSION&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;dimension_fields_list&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEASURE&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;fields_for_expressions&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DETAIL&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;field_list&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;table;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;If you wanna test this procedure is possible to load data from files available at links below. The first file is a MDB (Microsoft Access Database) used to implement the Direct Discovery procedure. The other file is a XLS (Microsoft Excel) that will be loaded at all to QlikView memory and it will associate data from Direct Discovery table. This procedure will let you understand how associative data model is capable to interact with data in memory and data from datasource at same time.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="external text" href="http://www.qknow.com.br/arquivos/data/qknow_msaccessdata_v1.0.mdb" rel="nofollow" style="color: #663366; padding-right: 13px;"&gt;qknow_msaccessdata_v1.0.mdb&lt;/A&gt; is a customer database for sales company.&lt;/LI&gt;&lt;LI&gt;&lt;A class="external text" href="http://www.qknow.com.br/arquivos/data/qknow_categoryfile_v1.0.xls" rel="nofollow" style="color: #663366; padding-right: 13px;"&gt;qknow_categoryfile_v1.0.xls&lt;/A&gt; is a category table for products.&lt;/LI&gt;&lt;/UL&gt;&lt;H1 style="color: black; font-weight: normal; margin: 0 0 0.25em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #aaaaaa; font-size: 1.8em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;Using Direct Discovery Instruction&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Ensure you have both files or a database available to test this procedure. First step is conect to database using &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;ODBC CONNECT&lt;/CODE&gt; instruction. Up to now no new procedure is need. With following tradicional instruction, QlikView will connect to database file in Microsoft Access format. &lt;STRONG&gt;Make sure you have updated the path for the file where you saved it&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;&lt;SPAN style="color: blue;"&gt;ODBC CONNECT32 TO&lt;/SPAN&gt; &lt;SPAN style="color: brown;"&gt;[QWT;DBQ=Q:\data\qknow_msaccessdata_v1.0.mdb]&lt;/SPAN&gt;; &lt;/PRE&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;After connected successfully copy the following command to get data from table using Direct Discovery procedure. Remember that all field listed on &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter will be loaded to QlikView memory as a normal process. In the other hand, any field specified at &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSAURE&lt;/CODE&gt; parameter will remain at database level. So, no data will be loaded in QlikView memory.&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;
&lt;P&gt;&lt;SPAN style="color: blue;"&gt;DIRECT QUERY&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIMENSION&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Categoria&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; CategoryID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FornecedorID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; SuppilerID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProdutoID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; ProductID&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEASURE &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrecoUnitario&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; UnitPrice,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustoUnitario&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; Cost,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QuantidadePorUnidade&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; Quantity,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UnidadesEmEstoque&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; QuantityInventory,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UnidadesPorPedidos&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; QuantitySelled&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DETAIL&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NomeProduto&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; ProductName&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt; Produtos;&lt;/P&gt;
&lt;/PRE&gt;&lt;DIV class="floatright" style="margin: 0 0 0.5em 0.5em; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable1.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable1.png" class="jive-image" height="201" src="http://www.qknow.com.br/wiki/images/8/85/DirectTable1.png" style="border: none;" width="333" /&gt;&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Using the previous command QlikView will load all data from fields defined at &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter with a normal process. This means all data from these fields are loaded in memory. But, all data from fields defined at MENSURE level will remain in database. In other words, these data will not be loaded to QlikView memory model. Save your job up to now and execute the &lt;EM&gt;script&lt;/EM&gt; using &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CTRL + R&lt;/CODE&gt; shortcut. After that, open the &lt;STRONG&gt;Table Viewer&lt;/STRONG&gt; and click with right button over table shown. It's possible to see all fields, but &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Preview&lt;/CODE&gt; command isn't available.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;More one difference. When Direct Discovery is in place no &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; fields are shown in dimension fields when a new chart is created. Only fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter are shown. But, this no mean that all fields aren't available. When creating a new chart is possible select any field from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter, but no fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; is available. This behavior can mistake you. In fact, all fields are available, but each group in its respective place. &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSIONS&lt;/CODE&gt; are available for dimension purpose, while &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; are available for expressions.&lt;/P&gt;&lt;P class="floatright" style="margin: 0 0 0.5em 0.5em; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable2.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable2.png" class="jive-image" height="205" src="http://www.qknow.com.br/wiki/images/9/93/DirectTable2.png" style="border: none;" width="270" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;While &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; fields aren't shown, all of them are available to be used at formulas, variables and expressions. That's why is possible enter a new expression just typing fields name. With dimension loaded in memory and expression getting data from database, QlikView will show to business users all data updated recently. Every interaction with the dashboard will create a automatic instruction to get data calculated from datasource. Of course your database should be able to answer each request as fast as possible, because QlikView needs wait data returned from datasource to update user interface. Anyway, this is good resouce to use with TERADATA solution, for example.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Now, try load Excel file that will be used to associate data completely in memory with data from Direct Discovery statement. Just return to Script Editor, pressing &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CTRL + E&lt;/CODE&gt; shortcut. Below previous command, add the following sample to load data from Excel spreedsheet. To maintain the link between tables remember to change a field to get the same name from DIMENSION list. Field used to link both tables is CategoryID. So, don't forget to change its name using &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;As&lt;/CODE&gt; clause. After run the &lt;EM&gt;script&lt;/EM&gt; go to Table Viewer again.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;
&lt;P&gt;&lt;STRONG&gt;CategoryTable&lt;/STRONG&gt;:&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;LOAD&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CategoriaID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; CategoryID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Descricao&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; Description,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NomeCategoria&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; CategoryName&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt; [Categorias.xls]&lt;BR /&gt;(&lt;SPAN style="color: blue;"&gt;biff, embedded labels, table is&lt;/SPAN&gt; Categorias$);&lt;/P&gt;
&lt;/PRE&gt;&lt;P class="floatleft" style="margin: 0 0.5em 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable4.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable4.png" class="jive-image" height="202" src="http://www.qknow.com.br/wiki/images/0/0e/DirectTable4.png" style="border: none;" width="533" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Now, both tables are connected. Any selection from a field on any table will get data from datasource where &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; are present. For category table no Direct Discovery technique wasn't used. Therefore, any new category values will be not loaded up to full reload process. Fields present in &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; list, can be used in charts or List objects. Anymore, theses fields can be used to link tables, as we saw. With this scenario each interaction will create a SQL SELECT automatically using a GROUP BY statement available from each specific plataform. Not all records will need to be transmitted from datasources to QlikView, since just computed values are needed.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Next section will show you how to create a new chart using fields from both tables and add Lists to validate this behavior.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="color: black; font-weight: normal; margin: 0 0 0.25em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #aaaaaa; font-size: 1.8em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;Creating a Chart Using Both Tables&lt;/SPAN&gt;&lt;/H1&gt;&lt;P class="floatright" style="margin: 0 0 0.5em 0.5em; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable3.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable3.png" class="jive-image" height="159" src="http://www.qknow.com.br/wiki/images/a/a9/DirectTable3.png" style="border: none;" width="258" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;To create a new chart just click with right mouse button over an empty place of main document and select &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;New Sheet Object&lt;/CODE&gt;. In sub-menu click &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Chart&lt;/CODE&gt;. When &lt;STRONG&gt;Create Chart Assistent&lt;/STRONG&gt; is shown choice the bar chart and click &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Next&lt;/CODE&gt;. When &lt;STRONG&gt;Dimension&lt;/STRONG&gt; window is shown fields from all tables loaded are available to be add to &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Used Dimension&lt;/CODE&gt; list. However, no fields from &amp;lt;/code&amp;gt;MENSURE&amp;lt;/code&amp;gt; parameter used by Direct Discovery technique are present. From the available list, add &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CategoryName&lt;/CODE&gt;. Remember &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CategoryName&lt;/CODE&gt; is a field from Excel worksheet.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Click &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Next&lt;/CODE&gt; again to see &lt;STRONG&gt;Expression Window&lt;/STRONG&gt; where you can define a formula. Now, type the following code. While you're typing, take a look that &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Quantity&lt;/CODE&gt; field is shown. When you finish, click Ok. Take some time to turn your chart more graceful. The following example shows how the chart created is, after some changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;=&lt;SPAN style="color: blue;"&gt;Sum&lt;/SPAN&gt;(Quantity) &lt;/PRE&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable5.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable5.png" class="jive-image" height="364" src="http://www.qknow.com.br/wiki/images/0/04/DirectTable5.png" style="border: none;" width="634" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Some aspects are important to know when working with Direct Discovery:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Only fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; and &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DETAILS&lt;/CODE&gt; parameters can be used in Lists.&lt;/LI&gt;&lt;LI&gt;Only fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; can act as fields in &lt;STRONG&gt;Used Dimensions&lt;/STRONG&gt; chart.&lt;/LI&gt;&lt;LI&gt;Not all functions from QlikView can be used through Direct Discovery.&lt;/LI&gt;&lt;LI&gt;Sometimes &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DirectIdentifierQuoteChar&lt;/CODE&gt; variable needs to be defined to use MySQL or Microsoft Access as datasources.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="color: blue;"&gt;SET&lt;/SPAN&gt; &lt;EM&gt;DirectIdentifierQuoteChar&lt;/EM&gt;='``';&lt;UL&gt;&lt;LI&gt;Calculated dimensions can't use fields from Direct Discovery.&lt;/LI&gt;&lt;LI&gt;Only fields defined on &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter of Direct Discovery can be used in Search Object.&lt;/LI&gt;&lt;LI&gt;When working with &lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="http://www.qknow.com.br/wiki/index.php/Section_Access_(English)" style="color: #0b0080; background: none;" title="Section Access (English)"&gt;Section Access (Reduction)&lt;/A&gt;&lt;/SPAN&gt;, data from Direct Discovery will be shown regardless user permissions.&lt;/LI&gt;&lt;LI&gt;If specific functions from datasources are need, use &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;NATIVE&lt;/CODE&gt; parameter.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="color: blue;"&gt;NATIVE&lt;/SPAN&gt;('Year([OrderDate])') As OrderYear&lt;UL&gt;&lt;LI&gt;You don't need install any aditional software to work with Direct Discovery.&lt;/LI&gt;&lt;LI&gt;Both 32 and 64 bits connectors can be used through OLEDB or ODBC.&lt;/LI&gt;&lt;LI&gt;If using Direct Discovery in multiple tables, set &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DirectConnectionMax&lt;/CODE&gt; variable to number of simultaneous connections. Default value is 1.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="color: blue;"&gt;SET&lt;/SPAN&gt; &lt;EM&gt;DirectConnectionMax&lt;/EM&gt;=10;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;STRONG&gt;Download this sample here!&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="external text" href="http://www.qknow.com.br/arquivos/qvw/general_samples/qknow_direct_discovery_v1.0.qvw" rel="nofollow" style="color: #663366; padding-right: 13px;"&gt;Direct Discovery Sample.QVW&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15.4px;"&gt;&lt;STRONG&gt;Used Function&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;Sum&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15.4px;"&gt;&lt;STRONG&gt;Related Posts&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="http://www.qknow.com.br/wiki/index.php/Section_Access_(English)" style="color: #0b0080; background: none;" title="Section Access (English)"&gt;Restricting Data for User Login (Section Access)&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="http://www.qknow.com.br/wiki/index.php/Using_Variables_for_Expressions" style="color: #0b0080; background: none;" title="Using Variables for Expressions"&gt;How to Use Variables&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;Qknow, Learn, Sharing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;Need more&lt;/STRONG&gt;&lt;/SPAN&gt;?&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3778c7; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;A href="http://www.qknow.com.br/"&gt;www.qknow.com.br&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;Don't worry, be Qlik.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;Tonial.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Nov 2015 14:31:00 GMT</pubDate>
    <dc:creator>fernando_tonial</dc:creator>
    <dc:date>2015-11-30T14:31:00Z</dc:date>
    <item>
      <title>Direct Discovery</title>
      <link>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470231#M54223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1 style="color: black; font-weight: normal; margin: 0 0 0.25em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #aaaaaa; font-size: 1.8em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;Introduction&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;By default, QlikView will load all data available directly to main memory based on scheduled tasks or manual actions for reload data. All calculation made to answer user navigation get data from memory where read process is very fast. As all know, QlikView/Qlik Sense has a very smart process to compact the data and use memory resources efficiently. However, &lt;STRONG&gt;sometimes data needs to be analysed as soon new records are inserted or updated from database&lt;/STRONG&gt;. Of course is possible to reload data in short intervals, but depends how much data should be loaded.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;When a lot of tables and data will be read again in very short intervals, is possible have no time enough between each reload procedure to maintain the dashboard updated. That is why the QlikView has the ability to get data directly from data sources every time a user interact with objects. The concept here is named Direct Discovery. This resource is used to get all measures directly from databases while maintaining dimensions loaded in memory. &lt;STRONG&gt;So, from this perspective, QlikView will work using a hybrid mode&lt;/STRONG&gt;. That mean, &lt;STRONG&gt;a portion of data is loaded to memory while other one is got from databases&lt;/STRONG&gt; (datasources) &lt;STRONG&gt;every single time users interact with dashboards&lt;/STRONG&gt;.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;This post will teach you how to implement Direct Discovery through &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Direct Query&lt;/CODE&gt; instruction, that should be used at script level. Instead of use a traditional SQL SELECT instruction, use &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Direct Query&lt;/CODE&gt; command to tell to QlikView get part of data from database to memory while other part will remain at datasource. The basic syntax for this instruction is shown below:&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;
&lt;P&gt;&lt;SPAN style="color: blue;"&gt;DIRECT QUERY &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIMENSION&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;dimension_fields_list&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEASURE&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;fields_for_expressions&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DETAIL&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;field_list&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;EM&gt;table;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;If you wanna test this procedure is possible to load data from files available at links below. The first file is a MDB (Microsoft Access Database) used to implement the Direct Discovery procedure. The other file is a XLS (Microsoft Excel) that will be loaded at all to QlikView memory and it will associate data from Direct Discovery table. This procedure will let you understand how associative data model is capable to interact with data in memory and data from datasource at same time.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="external text" href="http://www.qknow.com.br/arquivos/data/qknow_msaccessdata_v1.0.mdb" rel="nofollow" style="color: #663366; padding-right: 13px;"&gt;qknow_msaccessdata_v1.0.mdb&lt;/A&gt; is a customer database for sales company.&lt;/LI&gt;&lt;LI&gt;&lt;A class="external text" href="http://www.qknow.com.br/arquivos/data/qknow_categoryfile_v1.0.xls" rel="nofollow" style="color: #663366; padding-right: 13px;"&gt;qknow_categoryfile_v1.0.xls&lt;/A&gt; is a category table for products.&lt;/LI&gt;&lt;/UL&gt;&lt;H1 style="color: black; font-weight: normal; margin: 0 0 0.25em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #aaaaaa; font-size: 1.8em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;Using Direct Discovery Instruction&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Ensure you have both files or a database available to test this procedure. First step is conect to database using &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;ODBC CONNECT&lt;/CODE&gt; instruction. Up to now no new procedure is need. With following tradicional instruction, QlikView will connect to database file in Microsoft Access format. &lt;STRONG&gt;Make sure you have updated the path for the file where you saved it&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;&lt;SPAN style="color: blue;"&gt;ODBC CONNECT32 TO&lt;/SPAN&gt; &lt;SPAN style="color: brown;"&gt;[QWT;DBQ=Q:\data\qknow_msaccessdata_v1.0.mdb]&lt;/SPAN&gt;; &lt;/PRE&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;After connected successfully copy the following command to get data from table using Direct Discovery procedure. Remember that all field listed on &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter will be loaded to QlikView memory as a normal process. In the other hand, any field specified at &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSAURE&lt;/CODE&gt; parameter will remain at database level. So, no data will be loaded in QlikView memory.&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;
&lt;P&gt;&lt;SPAN style="color: blue;"&gt;DIRECT QUERY&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIMENSION&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Categoria&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; CategoryID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FornecedorID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; SuppilerID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProdutoID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; ProductID&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEASURE &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrecoUnitario&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; UnitPrice,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustoUnitario&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; Cost,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QuantidadePorUnidade&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; Quantity,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UnidadesEmEstoque&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; QuantityInventory,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UnidadesPorPedidos&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; QuantitySelled&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DETAIL&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NomeProduto&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; ProductName&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt; Produtos;&lt;/P&gt;
&lt;/PRE&gt;&lt;DIV class="floatright" style="margin: 0 0 0.5em 0.5em; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable1.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable1.png" class="jive-image" height="201" src="http://www.qknow.com.br/wiki/images/8/85/DirectTable1.png" style="border: none;" width="333" /&gt;&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Using the previous command QlikView will load all data from fields defined at &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter with a normal process. This means all data from these fields are loaded in memory. But, all data from fields defined at MENSURE level will remain in database. In other words, these data will not be loaded to QlikView memory model. Save your job up to now and execute the &lt;EM&gt;script&lt;/EM&gt; using &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CTRL + R&lt;/CODE&gt; shortcut. After that, open the &lt;STRONG&gt;Table Viewer&lt;/STRONG&gt; and click with right button over table shown. It's possible to see all fields, but &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Preview&lt;/CODE&gt; command isn't available.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;More one difference. When Direct Discovery is in place no &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; fields are shown in dimension fields when a new chart is created. Only fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter are shown. But, this no mean that all fields aren't available. When creating a new chart is possible select any field from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter, but no fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; is available. This behavior can mistake you. In fact, all fields are available, but each group in its respective place. &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSIONS&lt;/CODE&gt; are available for dimension purpose, while &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; are available for expressions.&lt;/P&gt;&lt;P class="floatright" style="margin: 0 0 0.5em 0.5em; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable2.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable2.png" class="jive-image" height="205" src="http://www.qknow.com.br/wiki/images/9/93/DirectTable2.png" style="border: none;" width="270" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;While &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; fields aren't shown, all of them are available to be used at formulas, variables and expressions. That's why is possible enter a new expression just typing fields name. With dimension loaded in memory and expression getting data from database, QlikView will show to business users all data updated recently. Every interaction with the dashboard will create a automatic instruction to get data calculated from datasource. Of course your database should be able to answer each request as fast as possible, because QlikView needs wait data returned from datasource to update user interface. Anyway, this is good resouce to use with TERADATA solution, for example.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Now, try load Excel file that will be used to associate data completely in memory with data from Direct Discovery statement. Just return to Script Editor, pressing &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CTRL + E&lt;/CODE&gt; shortcut. Below previous command, add the following sample to load data from Excel spreedsheet. To maintain the link between tables remember to change a field to get the same name from DIMENSION list. Field used to link both tables is CategoryID. So, don't forget to change its name using &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;As&lt;/CODE&gt; clause. After run the &lt;EM&gt;script&lt;/EM&gt; go to Table Viewer again.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;
&lt;P&gt;&lt;STRONG&gt;CategoryTable&lt;/STRONG&gt;:&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;LOAD&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CategoriaID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; CategoryID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Descricao&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; Description,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NomeCategoria&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;As&lt;/SPAN&gt; CategoryName&lt;BR /&gt;&lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt; [Categorias.xls]&lt;BR /&gt;(&lt;SPAN style="color: blue;"&gt;biff, embedded labels, table is&lt;/SPAN&gt; Categorias$);&lt;/P&gt;
&lt;/PRE&gt;&lt;P class="floatleft" style="margin: 0 0.5em 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable4.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable4.png" class="jive-image" height="202" src="http://www.qknow.com.br/wiki/images/0/0e/DirectTable4.png" style="border: none;" width="533" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Now, both tables are connected. Any selection from a field on any table will get data from datasource where &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;MENSURE&lt;/CODE&gt; are present. For category table no Direct Discovery technique wasn't used. Therefore, any new category values will be not loaded up to full reload process. Fields present in &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; list, can be used in charts or List objects. Anymore, theses fields can be used to link tables, as we saw. With this scenario each interaction will create a SQL SELECT automatically using a GROUP BY statement available from each specific plataform. Not all records will need to be transmitted from datasources to QlikView, since just computed values are needed.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Next section will show you how to create a new chart using fields from both tables and add Lists to validate this behavior.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="color: black; font-weight: normal; margin: 0 0 0.25em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #aaaaaa; font-size: 1.8em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;Creating a Chart Using Both Tables&lt;/SPAN&gt;&lt;/H1&gt;&lt;P class="floatright" style="margin: 0 0 0.5em 0.5em; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable3.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable3.png" class="jive-image" height="159" src="http://www.qknow.com.br/wiki/images/a/a9/DirectTable3.png" style="border: none;" width="258" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;To create a new chart just click with right mouse button over an empty place of main document and select &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;New Sheet Object&lt;/CODE&gt;. In sub-menu click &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Chart&lt;/CODE&gt;. When &lt;STRONG&gt;Create Chart Assistent&lt;/STRONG&gt; is shown choice the bar chart and click &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Next&lt;/CODE&gt;. When &lt;STRONG&gt;Dimension&lt;/STRONG&gt; window is shown fields from all tables loaded are available to be add to &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Used Dimension&lt;/CODE&gt; list. However, no fields from &amp;lt;/code&amp;gt;MENSURE&amp;lt;/code&amp;gt; parameter used by Direct Discovery technique are present. From the available list, add &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CategoryName&lt;/CODE&gt;. Remember &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;CategoryName&lt;/CODE&gt; is a field from Excel worksheet.&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Click &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Next&lt;/CODE&gt; again to see &lt;STRONG&gt;Expression Window&lt;/STRONG&gt; where you can define a formula. Now, type the following code. While you're typing, take a look that &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;Quantity&lt;/CODE&gt; field is shown. When you finish, click Ok. Take some time to turn your chart more graceful. The following example shows how the chart created is, after some changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="font-family: monospace, Courier; color: black; border-left-width: 1px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; font-size: 14px; background-color: #f9f9f9;"&gt;=&lt;SPAN style="color: blue;"&gt;Sum&lt;/SPAN&gt;(Quantity) &lt;/PRE&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;A class="image" href="http://www.qknow.com.br/wiki/index.php/Arquivo:DirectTable5.png" style="color: #0b0080; background: none;"&gt;&lt;IMG alt="DirectTable5.png" class="jive-image" height="364" src="http://www.qknow.com.br/wiki/images/0/04/DirectTable5.png" style="border: none;" width="634" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;Some aspects are important to know when working with Direct Discovery:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Only fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; and &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DETAILS&lt;/CODE&gt; parameters can be used in Lists.&lt;/LI&gt;&lt;LI&gt;Only fields from &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; can act as fields in &lt;STRONG&gt;Used Dimensions&lt;/STRONG&gt; chart.&lt;/LI&gt;&lt;LI&gt;Not all functions from QlikView can be used through Direct Discovery.&lt;/LI&gt;&lt;LI&gt;Sometimes &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DirectIdentifierQuoteChar&lt;/CODE&gt; variable needs to be defined to use MySQL or Microsoft Access as datasources.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="color: blue;"&gt;SET&lt;/SPAN&gt; &lt;EM&gt;DirectIdentifierQuoteChar&lt;/EM&gt;='``';&lt;UL&gt;&lt;LI&gt;Calculated dimensions can't use fields from Direct Discovery.&lt;/LI&gt;&lt;LI&gt;Only fields defined on &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DIMENSION&lt;/CODE&gt; parameter of Direct Discovery can be used in Search Object.&lt;/LI&gt;&lt;LI&gt;When working with &lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="http://www.qknow.com.br/wiki/index.php/Section_Access_(English)" style="color: #0b0080; background: none;" title="Section Access (English)"&gt;Section Access (Reduction)&lt;/A&gt;&lt;/SPAN&gt;, data from Direct Discovery will be shown regardless user permissions.&lt;/LI&gt;&lt;LI&gt;If specific functions from datasources are need, use &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;NATIVE&lt;/CODE&gt; parameter.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="color: blue;"&gt;NATIVE&lt;/SPAN&gt;('Year([OrderDate])') As OrderYear&lt;UL&gt;&lt;LI&gt;You don't need install any aditional software to work with Direct Discovery.&lt;/LI&gt;&lt;LI&gt;Both 32 and 64 bits connectors can be used through OLEDB or ODBC.&lt;/LI&gt;&lt;LI&gt;If using Direct Discovery in multiple tables, set &lt;CODE style="font-family: monospace, Courier; color: black; padding: 1px 4px; background-color: #f9f9f9;"&gt;DirectConnectionMax&lt;/CODE&gt; variable to number of simultaneous connections. Default value is 1.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="color: blue;"&gt;SET&lt;/SPAN&gt; &lt;EM&gt;DirectConnectionMax&lt;/EM&gt;=10;&lt;P style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;STRONG&gt;Download this sample here!&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="external text" href="http://www.qknow.com.br/arquivos/qvw/general_samples/qknow_direct_discovery_v1.0.qvw" rel="nofollow" style="color: #663366; padding-right: 13px;"&gt;Direct Discovery Sample.QVW&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15.4px;"&gt;&lt;STRONG&gt;Used Function&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;Sum&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN style="margin: 0.5em 0; color: #252525; font-family: sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15.4px;"&gt;&lt;STRONG&gt;Related Posts&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="http://www.qknow.com.br/wiki/index.php/Section_Access_(English)" style="color: #0b0080; background: none;" title="Section Access (English)"&gt;Restricting Data for User Login (Section Access)&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="http://www.qknow.com.br/wiki/index.php/Using_Variables_for_Expressions" style="color: #0b0080; background: none;" title="Using Variables for Expressions"&gt;How to Use Variables&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;Qknow, Learn, Sharing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;Need more&lt;/STRONG&gt;&lt;/SPAN&gt;?&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3778c7; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;A href="http://www.qknow.com.br/"&gt;www.qknow.com.br&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;Don't worry, be Qlik.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;"&gt;Tonial.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 14:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470231#M54223</guid>
      <dc:creator>fernando_tonial</dc:creator>
      <dc:date>2015-11-30T14:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Discovery</title>
      <link>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470232#M54224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TONIAL!&lt;/P&gt;&lt;P&gt;Thank you very much for sharing&lt;/P&gt;&lt;P&gt;Excellent article,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 20:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470232#M54224</guid>
      <dc:creator>sergioabr_tocca</dc:creator>
      <dc:date>2015-12-01T20:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Discovery</title>
      <link>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470233#M54225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ótimo artigo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obrigado por compartilhar com a gente&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 11:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Direct-Discovery/m-p/1470233#M54225</guid>
      <dc:creator>eduardo_sommer</dc:creator>
      <dc:date>2015-12-04T11:06:45Z</dc:date>
    </item>
  </channel>
</rss>

