<?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: Weird Pick(Match()) behaviour with measures in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543606#M109576</link>
    <description>&lt;P&gt;I assume that this:&amp;nbsp;&lt;SPAN&gt;Match([Comparator], 'vs Comp') doesn't returned 1 else 0 or NULL. This means that either Comparator doesn't contained a value of:&amp;nbsp;'vs Comp' or the call of Comparator results in NULL because there is more as single value available or the relationship of the field in regard to the object and/or the selections prevent the return of any value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just put&amp;nbsp;Match([Comparator], 'vs Comp') and&amp;nbsp;[Comparator] as expressions in the chart.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Feb 2026 13:58:29 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2026-02-24T13:58:29Z</dc:date>
    <item>
      <title>Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543403#M109517</link>
      <description>&lt;P&gt;I'm getting some really weird behaviour using Pick(Match()) with some measures, and feel like I've tried everything.&lt;/P&gt;&lt;P&gt;I have a table in Qlik Sense which I am using to show various metrics and compare to either a target or a comparison period. The comparison columns are being handled with measures that switch depending on what the user selects. Examples of the measures I'm using are:&lt;/P&gt;&lt;P&gt;[Qty] = Sum([Sales.Qty])&lt;BR /&gt;[QtySwitch] = Pick(Match([Comparator], 'vs Target', 'vs Comp'), [QtyTarget], [QtyComp])&lt;BR /&gt;[QtyComp] = Sum({&amp;lt;[Calendar.Period] =, [Calendar.SalesDate.autoCalendar.Date] = {"&amp;gt;=$(vCompStartDate)&amp;lt;=$(vCompEndDate)"}&amp;gt;} [Sales.Qty])&lt;/P&gt;&lt;P&gt;Now the weird behaviour. When 'vs Comp' is selected, where there is no [Qty] on a particular line (ie there are no sales on the currently selected period), [QtySwitch] is returning null. However, the line does show (just with null values). Also, lines with a value for [Qty] are fine, and the total is correct (so the lines don't add up to the total). And the really weird bit is that if I put [QtyComp] in a column on it's own, it works perfectly. Also tried changing the Pick(Match()) to nested ifs and that doesn't work either (same behaviour).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MartinW1_0-1771526502831.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/187013i36280AE7E95323EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MartinW1_0-1771526502831.png" alt="MartinW1_0-1771526502831.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have I missed something obvious? Is this just a bug? Any suggestions for getting round the issue?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2026 18:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543403#M109517</guid>
      <dc:creator>MartinW1</dc:creator>
      <dc:date>2026-02-19T18:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543406#M109519</link>
      <description>&lt;P&gt;You can get strange results if you don't use an aggregation function. In your case, I would use something like:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;[QtySwitch] = Pick(Match([Comparator], 'vs Target', 'vs Comp'), Sum([QtyTarget]), Sum([QtyComp]))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2026 22:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543406#M109519</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2026-02-19T22:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543424#M109523</link>
      <description>&lt;P&gt;This leaves me with nested aggregation that it doesn't like.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 09:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543424#M109523</guid>
      <dc:creator>MartinW1</dc:creator>
      <dc:date>2026-02-20T09:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543425#M109524</link>
      <description>&lt;P&gt;Incidentally, I just tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;[QtySwitch] = Pick(Match([Comparator], 'vs Target', 'vs Comp'), [QtyTarget],&amp;nbsp;Sum({&amp;lt;[Calendar.Period] =, [Calendar.SalesDate.autoCalendar.Date] = {"&amp;gt;=$(vCompStartDate)&amp;lt;=$(vCompEndDate)"}&amp;gt;} [Sales.Qty]))&lt;/P&gt;&lt;P&gt;And that also doesn't work, with the same behaviour. So this is seems to be unrelated to the separate measures?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 09:13:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543425#M109524</guid>
      <dc:creator>MartinW1</dc:creator>
      <dc:date>2026-02-20T09:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543434#M109525</link>
      <description>&lt;P&gt;A nesting of aggregations is possible if they are wrapped within an aggr(), which may look in your case like:&lt;/P&gt;&lt;P&gt;sum(aggr(&lt;SPAN&gt;[QtyTarget], Dim1, Dim2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;whereby the Dim# are just placeholder for the needed dimension-context.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Further Qlik evaluates all branches of a conditional-calculation which makes it more likely that the result is NULL if any of the parts contains an invalid call.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There are some ways to catch NULL within the UI but they are depending on the data-model/data-set and the object-dimensions if and which way are possible - and it caused often more or less side-effects to the complexity, usability and performance. Therefore it's often better to populate the missing data within the data-model.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 12:35:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543434#M109525</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-02-20T12:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543469#M109537</link>
      <description>&lt;P&gt;use Aggr function&lt;/P&gt;&lt;P&gt;SUM(AGGR(Sum(QtyTarget), qty))&lt;/P&gt;</description>
      <pubDate>Sat, 21 Feb 2026 05:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543469#M109537</guid>
      <dc:creator>Nagaraju_KCS</dc:creator>
      <dc:date>2026-02-21T05:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543600#M109573</link>
      <description>&lt;P&gt;Just to update this, nothing suggested has worked; it seems to be a bug with conditional calculations. Even hard coding the sums into the Pick(Match()) (so no extra measures or date variables) and ensuring that all options evaluate to non null results doesn't work. I'd be curious to know if anyone else can replicate the issue. But for now, I have no solution.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 12:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543600#M109573</guid>
      <dc:creator>MartinW1</dc:creator>
      <dc:date>2026-02-24T12:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543602#M109574</link>
      <description>&lt;P&gt;I doubt that there is a bug within the conditional evaluation else that the data-set respectively the relationship between the data is the cause and that there is probably nothing wrong else it's been working as expected.&lt;/P&gt;&lt;P&gt;Key in your case is very likely the understanding of: &lt;A href="https://community.qlik.com/t5/Member-Articles/NULL-handling-in-QlikView/ta-p/1484472/page/3" target="_blank"&gt;NULL handling in QlikView - Page 3 - Qlik Community - 1484472&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 12:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543602#M109574</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-02-24T12:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543603#M109575</link>
      <description>&lt;P&gt;Then can you explain why this works:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Calendar.Period] = &amp;gt;} [Sales.Qty])&lt;/P&gt;&lt;P&gt;But this doesn't:&lt;/P&gt;&lt;P&gt;Pick(Match([Comparator], 'vs Comp'), Sum({&amp;lt;[Calendar.Period] = &amp;gt;} [Sales.Qty]))&lt;/P&gt;&lt;P&gt;I don't see how that can be a model issue or null handling, or in fact anything other than a bug?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 13:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543603#M109575</guid>
      <dc:creator>MartinW1</dc:creator>
      <dc:date>2026-02-24T13:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543606#M109576</link>
      <description>&lt;P&gt;I assume that this:&amp;nbsp;&lt;SPAN&gt;Match([Comparator], 'vs Comp') doesn't returned 1 else 0 or NULL. This means that either Comparator doesn't contained a value of:&amp;nbsp;'vs Comp' or the call of Comparator results in NULL because there is more as single value available or the relationship of the field in regard to the object and/or the selections prevent the return of any value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just put&amp;nbsp;Match([Comparator], 'vs Comp') and&amp;nbsp;[Comparator] as expressions in the chart.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 13:58:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543606#M109576</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-02-24T13:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543610#M109577</link>
      <description>&lt;P&gt;That's it! [Comparator] is returning null for lines with no data in the current period. Now my question is why? That is a disconnected table built in the load script, I'd expect it to return the current selection regardless of other filters/sums on the page or table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, solution is:&lt;/P&gt;&lt;P&gt;[QtySwitch] = Pick(Match(GetFieldSelections([Comparator]), 'vs Target', 'vs Comp'), [QtyTarget], [QtyComp])&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 14:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543610#M109577</guid>
      <dc:creator>MartinW1</dc:creator>
      <dc:date>2026-02-24T14:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Weird Pick(Match()) behaviour with measures</title>
      <link>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543615#M109580</link>
      <description>&lt;P&gt;If this isolated table is used within an object it's then related/joined and if there is no dimension-value for the chart-dimension no other reference could be set because nothing exists against anything could be related.&lt;/P&gt;&lt;P&gt;Therefore the above hint to populate missing values as the usually simplest way to be able to address any context to them.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 15:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Weird-Pick-Match-behaviour-with-measures/m-p/2543615#M109580</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-02-24T15:33:48Z</dc:date>
    </item>
  </channel>
</rss>

