<?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 Number and Percentage format in a Straight Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985931#M956886</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to figure this out all morning so I hope someone can help me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table and it lists all the KPI's which can be either a number or a percentage. In the table I use the expression below. But there are two number KPI's that it keeps formatting as a percentage, if I select them on their own they show as a number, but I need them to be a number in the main table as well. They are 1's but they keep coming up as 100%. If I don't have '#,##0%' in the expression it shows them as 1.0 which would be fine but I need the percentage sign in for all the other figures, as soon as I do that, it changes these two particular KPI's to 100%!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone can help, I have run out of ideas.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;BR /&gt;if(Format_KPI = '#' And KPI_Order &amp;lt;&amp;gt; '3.12' And KPI_Order &amp;lt;&amp;gt; '3.18',&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;if(Format_KPI='%',&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)/sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;if(KPI_Order='3.12', //it is a number but an average&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)/sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;if(KPI_Order='3.18', //it is a number but an average&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)/sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2015 14:04:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-11-12T14:04:13Z</dc:date>
    <item>
      <title>Number and Percentage format in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985931#M956886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to figure this out all morning so I hope someone can help me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table and it lists all the KPI's which can be either a number or a percentage. In the table I use the expression below. But there are two number KPI's that it keeps formatting as a percentage, if I select them on their own they show as a number, but I need them to be a number in the main table as well. They are 1's but they keep coming up as 100%. If I don't have '#,##0%' in the expression it shows them as 1.0 which would be fine but I need the percentage sign in for all the other figures, as soon as I do that, it changes these two particular KPI's to 100%!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone can help, I have run out of ideas.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;BR /&gt;if(Format_KPI = '#' And KPI_Order &amp;lt;&amp;gt; '3.12' And KPI_Order &amp;lt;&amp;gt; '3.18',&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;if(Format_KPI='%',&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)/sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;if(KPI_Order='3.12', //it is a number but an average&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)/sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;if(KPI_Order='3.18', //it is a number but an average&lt;BR /&gt;Aggr(&lt;BR /&gt;Num(&lt;BR /&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator)/sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator)&lt;BR /&gt;,KPI_Actual_Format)&lt;BR /&gt;,KPI_Description))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 14:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985931#M956886</guid>
      <dc:creator />
      <dc:date>2015-11-12T14:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Number and Percentage format in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985932#M956888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's unnecessarily complicated and the nested if's with aggr inside will consume a lot of ressources. I suggest something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simplyfied: num(aggr(), Format)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Format isn't already matched to the dimension then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(condition, Format1, Format2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or maybe&lt;/P&gt;&lt;P&gt;pick(match(), Format1, Format2, Format3 ,...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Aggr(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Numerator) /&lt;/P&gt;&lt;P&gt;if(Format_KPI='%' or match(KPI_Order, '3.12', '3.18'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;Current_Month={"$(=max(Current_Month))"}&amp;gt;} Denominator), 1)&lt;/P&gt;&lt;P&gt;,KPI_Description),&lt;/P&gt;&lt;P&gt;,KPI_Actual_Format)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the formatting isn't correct then KPI_Actual_Format isn't correct or unique (is there more then one field-value available then returned a Field call NULL without an aggregation-function).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 16:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985932#M956888</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-11-12T16:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Number and Percentage format in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985933#M956890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Katy,&lt;/P&gt;&lt;P&gt;try the below expression, based on Marcus solutions.&lt;/P&gt;&lt;P&gt;If it works fine you have to look at KPI_Actual_Format values to solve your format error.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Current_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(=max(Current_Month))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Numerator&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Format_KPI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='%' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KPI_Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, '3.12', '3.18'), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Current_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(=max(Current_Month))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Denominator&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 1)&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KPI_Description&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Format_KPI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='%','##0,00%','#.##0,00'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 17:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985933#M956890</guid>
      <dc:creator>anlonghi2</dc:creator>
      <dc:date>2015-11-12T17:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number and Percentage format in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985934#M956892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Thank you both for your solutions. But none of the expressions fix the problem I'm afraid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After more digging, I have found that it seems to be one KPI that is always 100% which is causing the problem. Any other KPI’s that have a number 1, always convert to a 100%. I’ve attached an image (bottom image is where I have excluded the 1.4 KPI which is always 100% and the figures are formatted correctly). Do you know of any way I can prevent this from happening? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help and I will definitely change my expression to one of these if it will improve performance.&lt;/P&gt;&lt;P&gt;Kate&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot Qlik.PNG" class="jive-image image-1" src="/legacyfs/online/105576_Screen Shot Qlik.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 09:49:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-and-Percentage-format-in-a-Straight-Table/m-p/985934#M956892</guid>
      <dc:creator />
      <dc:date>2015-11-16T09:49:59Z</dc:date>
    </item>
  </channel>
</rss>

