<?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 Mapping of master measures in sheets in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Mapping-of-master-measures-in-sheets/m-p/2097817#M18903</link>
    <description>&lt;P&gt;Dear Community,&lt;/P&gt;
&lt;P&gt;I am interested in retrieving the information about which master measure is used in which visualization object (table, KPI, barchart etc.). I am looking for a method to apply in the Engine API. Otherwise I could also use the QRS of course, just don't know where to find this information.&lt;/P&gt;
&lt;P&gt;Would be great if I could get some help on this. I have been searching for a while now, but nothing useful came up.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Mira&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 10:51:49 GMT</pubDate>
    <dc:creator>Mira_io</dc:creator>
    <dc:date>2023-07-27T10:51:49Z</dc:date>
    <item>
      <title>Mapping of master measures in sheets</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Mapping-of-master-measures-in-sheets/m-p/2097817#M18903</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;
&lt;P&gt;I am interested in retrieving the information about which master measure is used in which visualization object (table, KPI, barchart etc.). I am looking for a method to apply in the Engine API. Otherwise I could also use the QRS of course, just don't know where to find this information.&lt;/P&gt;
&lt;P&gt;Would be great if I could get some help on this. I have been searching for a while now, but nothing useful came up.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Mira&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 10:51:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Mapping-of-master-measures-in-sheets/m-p/2097817#M18903</guid>
      <dc:creator>Mira_io</dc:creator>
      <dc:date>2023-07-27T10:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping of master measures in sheets</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Mapping-of-master-measures-in-sheets/m-p/2097994#M18906</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You need to get the layout of the current sheet. Loop through each object and get their layout to find their measures. Each measure that has a "qLibraryId" is a master measure.&lt;/P&gt;
&lt;P&gt;Here's an idea of the flow using capability api, within an extension context:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;define( [ "qlik"
],
function ( qlik) {
	var app = qlik.currApp();
	var chartsAndMeasuresOnSheet = [];
	return {
		support : {
			snapshot: true,
			export: true,
			exportData : false
		},
		paint: function ($element) {
			//add your rendering code here
			$element.html( "checkForMasterItemsOnSheet" );
			var sheetId = qlik.navigation.getCurrentSheetId().sheetId;
			app.getObject(sheetId)
				.then((sheetObject) =&amp;gt; {
					return sheetObject.getLayout()
						.then((sheetLayout) =&amp;gt; {
							console.log({sheetLayout});
							(sheetLayout.cells).forEach(function (object) {
								var objectId = object.name;
								app.getObject(objectId).then((viz) =&amp;gt; {
									var chartType = viz.genericType;
									var chartId = viz.id;
									var chartMeasures = viz.layout.qHyperCube.qMeasureInfo;
									var chartMasterMeasures = chartMeasures.filter(function (el) { // only keep the master measures
									 	return el.qLibraryId;
									});
									chartsAndMeasuresOnSheet.push({id: chartId, type: chartType, masterMeasures: chartMasterMeasures});
								})
							})
						})
				})
				
			// you might need to deal with promise chaining, but that's the idea and it works within the context of an extension
			console.log({chartsAndMeasuresOnSheet});
		}
	};

} );

&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jul 2023 18:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Mapping-of-master-measures-in-sheets/m-p/2097994#M18906</guid>
      <dc:creator>rankassovitz</dc:creator>
      <dc:date>2023-07-27T18:29:34Z</dc:date>
    </item>
  </channel>
</rss>

