<?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 kpi object in mashup does not refresh after selections in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/kpi-object-in-mashup-does-not-refresh-after-selections/m-p/1818952#M15187</link>
    <description>&lt;P&gt;Ok guys! I'm getting crazy with the behaviour of a KPI object I have created on the fly with visualization API.&lt;/P&gt;&lt;P&gt;The object is correclty loaded but when I apply a filter the value shown in the KPI object deosn't change!!!&lt;/P&gt;&lt;P&gt;As an example if the first selection gives 20% I can see 20% in my webpage but if I do a second selection the visualization not refresh! I need to reload the page to see the value change!! This is unbelivable!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure I'm doing something wrong but I can't understand what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me!&lt;/P&gt;&lt;P&gt;This is the code I've used to develop my KPI object:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.visualization.create( 
	'kpi',
	  [
		{
      "qDef": {
        "qLabel": "",
        "qDef": "[KPI.KPI_ANS]",
        "qNumFormat": {
		"qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "0.0%",
          "qDec": ".",
          "qThou": ","
          
        },
		"conditionalColoring": {
          "useConditionalColoring": true,
          "segments": {
            "limits": [
              {
                "value": {
                  "qValueExpression": {
                    /*"qExpr": "=concat(distinct{1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS])"*/
					"qExpr": "=$(FirstMKT_ANS)"
                  }
                },
                "gradient": false
              }
            ],
            "paletteColors": [
              {
                "color": "#004d99",
                "icon": "S",
                "index": -1
              },
              {
                "color": "#04912b",
                "icon": "R",
                "index": -1
              }
            ]
          }
        }
      },
	  "qCalcCondition": { /*"qCond": "=(not(isnull([KPI.KPI_ANS])) and not(isnull(concat({1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS])))) and ([KPI.KPI_ANS] &amp;lt; concat({1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS]))",*/ 
	  					  "qCond": "=$(Cond_FirstMKT_ANS)",
						  "qMsg": ""
	  } 
    },
	{
      "qDef": {
        "qLabelExpression": "upper(Label_First)",
        /*"qDef": "=concat(distinct{1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS])",*/
		"qDef": "=$(FirstMKT_ANS)",
        "qNumFormat": {
          "qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "0.0%",
          "qDec": ".",
          "qThou": ","
        },
        "conditionalColoring": {
          "paletteSingleColor": {
            "index": -1,
            "color": "#5c5b5b"
          }
        }
      }
    }
	  ],
	  {
	  "showTitles": false,
	  "showMeasureTitle": false,
	  "textAlign": "center",
	  "fontSize": "L",
	}
	).then(function(vis){
	  vis.show("ANSBestMKT");
	});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty sure this is an issue related to promise returned by the vis.show method but i can't get the solution.&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 17:52:47 GMT</pubDate>
    <dc:creator>kikko</dc:creator>
    <dc:date>2021-06-30T17:52:47Z</dc:date>
    <item>
      <title>kpi object in mashup does not refresh after selections</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/kpi-object-in-mashup-does-not-refresh-after-selections/m-p/1818952#M15187</link>
      <description>&lt;P&gt;Ok guys! I'm getting crazy with the behaviour of a KPI object I have created on the fly with visualization API.&lt;/P&gt;&lt;P&gt;The object is correclty loaded but when I apply a filter the value shown in the KPI object deosn't change!!!&lt;/P&gt;&lt;P&gt;As an example if the first selection gives 20% I can see 20% in my webpage but if I do a second selection the visualization not refresh! I need to reload the page to see the value change!! This is unbelivable!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure I'm doing something wrong but I can't understand what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me!&lt;/P&gt;&lt;P&gt;This is the code I've used to develop my KPI object:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.visualization.create( 
	'kpi',
	  [
		{
      "qDef": {
        "qLabel": "",
        "qDef": "[KPI.KPI_ANS]",
        "qNumFormat": {
		"qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "0.0%",
          "qDec": ".",
          "qThou": ","
          
        },
		"conditionalColoring": {
          "useConditionalColoring": true,
          "segments": {
            "limits": [
              {
                "value": {
                  "qValueExpression": {
                    /*"qExpr": "=concat(distinct{1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS])"*/
					"qExpr": "=$(FirstMKT_ANS)"
                  }
                },
                "gradient": false
              }
            ],
            "paletteColors": [
              {
                "color": "#004d99",
                "icon": "S",
                "index": -1
              },
              {
                "color": "#04912b",
                "icon": "R",
                "index": -1
              }
            ]
          }
        }
      },
	  "qCalcCondition": { /*"qCond": "=(not(isnull([KPI.KPI_ANS])) and not(isnull(concat({1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS])))) and ([KPI.KPI_ANS] &amp;lt; concat({1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS]))",*/ 
	  					  "qCond": "=$(Cond_FirstMKT_ANS)",
						  "qMsg": ""
	  } 
    },
	{
      "qDef": {
        "qLabelExpression": "upper(Label_First)",
        /*"qDef": "=concat(distinct{1 &amp;lt;[RankingMKT.Ranking]={'1'}, [Market]={'$(=aggr([Market],[Workshop name]))'}&amp;gt; }[KPI.KPI_ANS])",*/
		"qDef": "=$(FirstMKT_ANS)",
        "qNumFormat": {
          "qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "0.0%",
          "qDec": ".",
          "qThou": ","
        },
        "conditionalColoring": {
          "paletteSingleColor": {
            "index": -1,
            "color": "#5c5b5b"
          }
        }
      }
    }
	  ],
	  {
	  "showTitles": false,
	  "showMeasureTitle": false,
	  "textAlign": "center",
	  "fontSize": "L",
	}
	).then(function(vis){
	  vis.show("ANSBestMKT");
	});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty sure this is an issue related to promise returned by the vis.show method but i can't get the solution.&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 17:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/kpi-object-in-mashup-does-not-refresh-after-selections/m-p/1818952#M15187</guid>
      <dc:creator>kikko</dc:creator>
      <dc:date>2021-06-30T17:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: kpi object in mashup does not refresh after selections</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/kpi-object-in-mashup-does-not-refresh-after-selections/m-p/1945904#M16961</link>
      <description>&lt;P&gt;When using mashups you must update your (external) objects.&lt;/P&gt;
&lt;P&gt;Look:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GabrielLima_0-1655746884512.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82204i29B089B7F570F2DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GabrielLima_0-1655746884512.png" alt="GabrielLima_0-1655746884512.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 17:42:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/kpi-object-in-mashup-does-not-refresh-after-selections/m-p/1945904#M16961</guid>
      <dc:creator>GabrielLima</dc:creator>
      <dc:date>2022-06-20T17:42:07Z</dc:date>
    </item>
  </channel>
</rss>

