<?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 Re: Show a different value on a ListBox in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705295#M724834</link>
    <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;It's working now,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 16:14:07 GMT</pubDate>
    <dc:creator>brunolelli87</dc:creator>
    <dc:date>2020-05-26T16:14:07Z</dc:date>
    <item>
      <title>Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705042#M724826</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the following scrip to collect some data from Yahoo website.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;For each Index in 'BRL=X', 'EURBRL=X', 'CL=F', 'GC=F', 'SI=F', 'BTC-USD'
	
	Indices:
	Replace Load
		Date(Date#(@1,'YYYY-MM-DD'), 'DD/MM/YYYY')	 				as DVPG,	// Data a ser considerada						 
		'$(Index)' 													as INDX,	// Índice
	    Num#(@2, '#,##0,00;-#,##0.00', '.', ',')					as VDIA, 	// Valor do índice na abertura
	    Num#(@3, '#,##0,00;-#,##0.00', '.', ',')					as VMAI, 	// Valor mais alto do índiceno dia
	    Num#(@4, '#,##0,00;-#,##0.00', '.', ',')					as VMBI, 	// Valor mais baixo do índice no dia
	    Num#(@5, '#,##0,00;-#,##0.00', '.', ',')					as VDIF, 	// Valor do índice no fechamento
	    Num#(@6, '#,##0,00;-#,##0.00', '.', ',')					as VIFA, 	// Valor do índice no fechamento ajustado
	    Num#(@7, '#,##0,00;-#,##0.00', '.', ',')					as VDIN		// Volume negociado do índice
	FROM
		[https://query1.finance.yahoo.com/v7/finance/download/$(Index)?period1=1432252800&amp;amp;period2=1590105600&amp;amp;interval=1d&amp;amp;events=history] 	//5 Years Period
		(txt, codepage is 1252, no labels, delimiter is ',', msq, filters(
		Remove(Row, Pos(Top, 1)),
		Remove(Row, RowCnd(CellValue, 2, StrCnd(contain, 'null')))
	));

Next Index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, on a ListBox, I'm showing the values of INDX for the user's selection...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But instead of showing&amp;nbsp;'BRL=X', 'EURBRL=X', 'CL=F', 'GC=F', 'SI=F', 'BTC-USD', I would like to show 'Cotacao USD', 'Cotacao Euro', 'Petroleo', 'Ouro', 'Prata' and 'BitCoin'&lt;/P&gt;&lt;P&gt;How can I do it?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705042#M724826</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705053#M724827</link>
      <description>&lt;P&gt;Use a mapping like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MAP_LABELS:
Mapping LOAD * Inline
[
	Index, Label
	BRL=X,		Cotacao USD
	EURBRL=X,	Cotacao Euro
	CL=F,   	Petroleo
	GC=F,    	Ouro
	SI=F,    	Prata
	BTC-USD  	BitCoin
];
	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then modify the load of the main table slightly:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Indices:
Replace Load
    Date(Date#(@1,'YYYY-MM-DD'), 'DD/MM/YYYY')	 				as DVPG,	// Data a ser considerada						 
    '$(Index)' 													as INDX,	// Índice
    ApplyMap('MAP_LABELS', '$(Index)')							as LABEL,   // New label field
    Num#(@2, '#,##0,00;-#,##0.00', '.', ',')					as VDIA, 	
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now use the LABEL field.&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 07:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705053#M724827</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2020-05-26T07:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705059#M724828</link>
      <description>&lt;P&gt;fast and dirty:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if('$(Index)'='BRL=X',  'Cotacao USD',
if('$(Index)'='EURBRL=X',  'Cotacao Euro',
if('$(Index)'='CL=F',  'Petroleo',
...))) as Index_TXT&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;better would be a mapping table that you can join to your fact table.&lt;/P&gt;&lt;TABLE border="0" width="221px" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="82px" height="20"&gt;&lt;STRONG&gt;Index&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="81px"&gt;&lt;STRONG&gt;Index_TXT&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="82px" height="21"&gt;&lt;SPAN&gt;BRL=X&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="81px"&gt;Cotacao USD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="82px" height="20"&gt;EURBRL=X&lt;/TD&gt;&lt;TD width="81px"&gt;Cotacao Euro&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 07:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705059#M724828</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2020-05-26T07:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705074#M724829</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for your help...&lt;/P&gt;&lt;P&gt;It did not work very well, please take a look on what I did:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Labels:
Mapping LOAD * Inline
[
	Index, Label
	BRL=X,		Cotacao USD
	EURBRL=X,	Cotacao Euro
	CL=F,   	Petroleo
	GC=F,    	Ouro
	SI=F,    	Prata
	BTC-USD  	BitCoin
];


For each Index in 'BRL=X', 'EURBRL=X', 'CL=F', 'GC=F', 'SI=F', 'BTC-USD'
	
	Indices:
	Replace Load
		Date(Date#(@1,'YYYY-MM-DD'), 'DD/MM/YYYY')	 				as DVPG,	// Data a ser considerada						 
		'$(Index)' 													as INDX,	// Índice
		ApplyMap('Labels', '$(Index)')								as LABEL,   // New label field
	    Num#(@2, '#,##0,00;-#,##0.00', '.', ',')					as VDIA, 	// Valor do índice na abertura
	    Num#(@3, '#,##0,00;-#,##0.00', '.', ',')					as VMAI, 	// Valor mais alto do índiceno dia
	    Num#(@4, '#,##0,00;-#,##0.00', '.', ',')					as VMBI, 	// Valor mais baixo do índice no dia
	    Num#(@5, '#,##0,00;-#,##0.00', '.', ',')					as VDIF, 	// Valor do índice no fechamento
	    Num#(@6, '#,##0,00;-#,##0.00', '.', ',')					as VIFA, 	// Valor do índice no fechamento ajustado
	    Num#(@7, '#,##0,00;-#,##0.00', '.', ',')					as VDIN		// Volume negociado do índice
	FROM
		[https://query1.finance.yahoo.com/v7/finance/download/$(Index)?period1=1432252800&amp;amp;period2=1590105600&amp;amp;interval=1d&amp;amp;events=history] 	//5 Years Period
		(txt, codepage is 1252, no labels, delimiter is ',', msq, filters(
		Remove(Row, Pos(Top, 1)),
		Remove(Row, RowCnd(CellValue, 2, StrCnd(contain, 'null')))
	));

Next Index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result, I got a ListBox with just One field, the last one,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result.png" style="width: 544px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34320iE0C6FE3D3794F51D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result.png" alt="Result.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I solve it?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 07:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705074#M724829</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-26T07:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705081#M724830</link>
      <description>&lt;P&gt;tried this and it works for me.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Labels:
Load 'BRL=X' as Index, 		'Cotacao USD' as Label AutoGenerate(1);
Load 'EURBRL=X' as Index, 	'Cotacao Euro' as Label AutoGenerate(1);
Load 'CL=F' as Index, 		'Petroleo' as Label AutoGenerate(1);
Load 'GC=F' as Index, 		'Ouro' as Label AutoGenerate(1);
Load 'SI=F' as Index, 		'Prata' as Label AutoGenerate(1);
Load 'BTC-USD' as Index, 	'BitCoin' as Label AutoGenerate(1);

Map_Labels:
Mapping Load * Resident Labels;
drop table Labels;&lt;/LI-CODE&gt;&lt;P&gt;you can also put a default value in the applymap statement to check if there is no match.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ApplyMap('Map_Labels', '$(Index)', 'NO_MATCH')&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 May 2020 08:13:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705081#M724830</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2020-05-26T08:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705242#M724831</link>
      <description>&lt;P&gt;I believe I'm doing something wrong, becuase it's not working again!&lt;/P&gt;&lt;P&gt;Look at that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teste.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34360i8906ABEB047422AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Teste.png" alt="Teste.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it's because I'm doing a For Loop...&lt;BR /&gt;Should I insert your code inside the For Loop?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'll take a look at it!&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:12:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705242#M724831</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-26T14:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705248#M724832</link>
      <description>&lt;P&gt;Nop!&lt;/P&gt;&lt;P&gt;Look at that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teste2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34361i2D4D7D88600115E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Teste2.png" alt="Teste2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705248#M724832</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-26T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705253#M724833</link>
      <description>&lt;P&gt;The inline load for the mapping table was missing a comma:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Labels:&lt;BR /&gt;Mapping LOAD * Inline&lt;BR /&gt;[&lt;BR /&gt;Index, Label&lt;BR /&gt;BRL=X, Cotacao USD&lt;BR /&gt;EURBRL=X, Cotacao Euro&lt;BR /&gt;CL=F, Petroleo&lt;BR /&gt;GC=F, Ouro&lt;BR /&gt;SI=F, Prata&lt;BR /&gt;&lt;STRONG&gt;BTC-USD, BitCoin&lt;/STRONG&gt;&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705253#M724833</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2020-05-26T14:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Show a different value on a ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705295#M724834</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;It's working now,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 16:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-a-different-value-on-a-ListBox/m-p/1705295#M724834</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-26T16:14:07Z</dc:date>
    </item>
  </channel>
</rss>

