<?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 Generate formulas in table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Generate-formulas-in-table/m-p/1585094#M456685</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I try to create an overview of key figures in a table. This could be a pivot table, for example. I still need two comment fields for the key figure. This table can look like this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;KPI&lt;/TD&gt;&lt;TD&gt;Comment1&lt;/TD&gt;&lt;TD&gt;Comment 2&lt;/TD&gt;&lt;TD&gt;Formula&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;turnover&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;2.015.200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ROI&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;215.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 5+5&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 4+4&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The Formula column is to be calculated from different QlikView fields with different formulas. Does anyone know a good solution for this?&lt;/P&gt;&lt;P&gt;My idea is to load a new table for key figures into the data model. I create the new table in an Excel spreadsheet. In this table I define all columns and write the formulas I need. This will look like this.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;KPI&lt;/TD&gt;&lt;TD&gt;Comment1&lt;/TD&gt;&lt;TD&gt;Comment 2&lt;/TD&gt;&lt;TD&gt;Formula&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;turnover&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;=sum(turnover)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ROI&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;=sum(NetIncome)/sum(Investment)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 5+5&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;=5+5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 4+4&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;=4+4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Now I have created the table in QlikView. For this I created a pivot with the columns KPI, Comment1 and Comment2. As formula I use the following function:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$(=Formula)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If I filter the table to one KPI it works. With several formulas this doesn't work anymore. Does anyone have an idea what I did wrong?&lt;/P&gt;&lt;P&gt;I hope someone of you can help me.&lt;BR /&gt;Greetings&lt;BR /&gt;Alex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 20:47:26 GMT</pubDate>
    <dc:creator>qlikviewalex</dc:creator>
    <dc:date>2024-11-16T20:47:26Z</dc:date>
    <item>
      <title>Generate formulas in table</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-formulas-in-table/m-p/1585094#M456685</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I try to create an overview of key figures in a table. This could be a pivot table, for example. I still need two comment fields for the key figure. This table can look like this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;KPI&lt;/TD&gt;&lt;TD&gt;Comment1&lt;/TD&gt;&lt;TD&gt;Comment 2&lt;/TD&gt;&lt;TD&gt;Formula&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;turnover&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;2.015.200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ROI&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;215.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 5+5&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 4+4&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The Formula column is to be calculated from different QlikView fields with different formulas. Does anyone know a good solution for this?&lt;/P&gt;&lt;P&gt;My idea is to load a new table for key figures into the data model. I create the new table in an Excel spreadsheet. In this table I define all columns and write the formulas I need. This will look like this.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;KPI&lt;/TD&gt;&lt;TD&gt;Comment1&lt;/TD&gt;&lt;TD&gt;Comment 2&lt;/TD&gt;&lt;TD&gt;Formula&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;turnover&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;=sum(turnover)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ROI&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;s&lt;/TD&gt;&lt;TD&gt;=sum(NetIncome)/sum(Investment)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 5+5&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;=5+5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum of 4+4&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;=4+4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Now I have created the table in QlikView. For this I created a pivot with the columns KPI, Comment1 and Comment2. As formula I use the following function:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$(=Formula)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If I filter the table to one KPI it works. With several formulas this doesn't work anymore. Does anyone have an idea what I did wrong?&lt;/P&gt;&lt;P&gt;I hope someone of you can help me.&lt;BR /&gt;Greetings&lt;BR /&gt;Alex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-formulas-in-table/m-p/1585094#M456685</guid>
      <dc:creator>qlikviewalex</dc:creator>
      <dc:date>2024-11-16T20:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Generate formulas in table</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-formulas-in-table/m-p/1585221#M456686</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You'd have to get a calculated dimension with ValueList like so:&lt;BR /&gt;&lt;BR /&gt;=ValueList('Turnover','ROI','Sum of 5+5','Sum of 4+4')&lt;BR /&gt;&lt;BR /&gt;This will create a dummy dimension with 4 text on it.&lt;BR /&gt;As for expression, you'd use:&lt;BR /&gt;&lt;BR /&gt;pick&lt;BR /&gt;(&lt;BR /&gt;match&lt;BR /&gt;(&lt;BR /&gt;ValueList('Turnover','ROI','Sum of 5+5','Sum of 4+4'),&lt;BR /&gt;'Turnover',&lt;BR /&gt;'ROI',&lt;BR /&gt;'Sum of 5+5',&lt;BR /&gt;'Sum of 4+4'&lt;BR /&gt;),&lt;BR /&gt;$(v1),&lt;BR /&gt;$(v2),&lt;BR /&gt;$(v3),&lt;BR /&gt;$(v4)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Ive created the v1,v2,v3 and v4 variables like so:&lt;BR /&gt;v1: sum(value)&lt;BR /&gt;v2: 2&lt;BR /&gt;v3: 5+5&lt;BR /&gt;v4: 4+4&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting in:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample.png" style="width: 316px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12735iB60CE2CBA9E155B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample.png" alt="sample.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 19:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-formulas-in-table/m-p/1585221#M456686</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2019-05-27T19:04:42Z</dc:date>
    </item>
  </channel>
</rss>

