<?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: Min and Max values from selected dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811145#M1212637</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So this is horrible and I am sure will break, but try it anyway.&lt;/P&gt;&lt;P&gt;Add a second expression (that you can then hide on Presentation tab;&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL Mid(Number,3,3)),Max(TOTAL Mid(Number,3,3)))=Mid(Number,3,3),&lt;BR /&gt;If(RowNo(TOTAL)=1,1,IF(Only(Name)&amp;lt;&amp;gt;Above(Only(Name),-1),1,0)),&lt;BR /&gt;Null())&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210527_2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55843i78E52FF8E3C2088A/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210527_2.png" alt="20210527_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then on Dimension tab refer to that field in the Text Color of Name dimension;&lt;/P&gt;&lt;P&gt;=if(Column(2)=1,Black(),White())&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210527_3.png" style="width: 994px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55844iA11DD5B4D95125E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210527_3.png" alt="20210527_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Might hold together, might do odd things depending on what else you do with it.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT&lt;/STRONG&gt; - you need to add back in the Name &amp;amp; Type field on the TOTAL;&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)),Max(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)))=Mid(Number,3,3),Mid(Number,3,3),Null())&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)),Max(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)))=Mid(Number,3,3),&lt;BR /&gt;If(RowNo(TOTAL)=1,1,IF(Only(Name)&amp;lt;&amp;gt;Above(Only(Name),-1),1,0)),&lt;BR /&gt;Null())&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2021 18:20:33 GMT</pubDate>
    <dc:creator>chrismarlow</dc:creator>
    <dc:date>2021-05-27T18:20:33Z</dc:date>
    <item>
      <title>Min and Max values from selected dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1810422#M1212551</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Hello everyone,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I'm currently working on a pivot table, and I've encountered a situation.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Let's say I have this in my pivot table:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Name &amp;gt; Type &amp;gt; Number &amp;gt; Source&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;where type is either Cat or Dog, and my Number is a set of 8 digit numbers (although I want it to retrieve 3 digits, with a mid function).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm looking for is something like if my Type is Cat, I want to fetch the minimum value from the selected Number field (not the entire data, but the narrowed data with Name and other previous conditions).&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;P&gt;if(Type = 'Cat', min(mid(number(3,3)), max(mid(number(3,3)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;as in&lt;/STRONG&gt;: if the type is a cat, I want it to get me the minimum value that is set by the 3rd to 5th digit, and the maximum otherwise (if the type is a dog).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I'm only getting "// Error in calculated dimension". This isn't a static dimension either, as it depends on the selected fields.&lt;/P&gt;&lt;P&gt;I've attached a table with a picture of how it is right now, and how I intend it to be&lt;/P&gt;&lt;P&gt;Not sure if I've been clear enough to get an answer, so I'll try to explain with more detail if needed.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1810422#M1212551</guid>
      <dc:creator>AFigueiredo</dc:creator>
      <dc:date>2021-05-25T16:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Min and Max values from selected dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1810477#M1212559</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not sure about using a pivot table like this, or the calculated dimension bit, would be inclined to look at the data model.&lt;/P&gt;&lt;P&gt;However if you cannot do that but could use a straight table you could try the below;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210525_1.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55667i00A4CFB3D09C124D/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210525_1.png" alt="20210525_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here Name and Type are dimensions and the other two are expressions;&lt;/P&gt;&lt;P&gt;If(Type='Cat',Min(Mid(Number,3,3)),Max(Mid(Number,3,3)))&lt;/P&gt;&lt;P&gt;FirstSortedValue(Source,if(Type='Cat',Mid(Number,3,3),-Mid(Number,3,3)))&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 19:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1810477#M1212559</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-05-25T19:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Min and Max values from selected dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1810674#M1212585</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for answering, that was very helpful and helped me sort this out, partially. I've also changed to a straight table, as suggested.&lt;/P&gt;&lt;P&gt;I've now encountered another problem:&lt;/P&gt;&lt;P&gt;Let's say that for &lt;STRONG&gt;each number associated to Cat, there is 1 Source value&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;but for &lt;STRONG&gt;each number associated to Dog, there are 5 Source values&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution works great for Cat, as I only have one source number associated, but for Dog, my output is ' - ', as there are 5 different values. Is there a way to show the 5 of them?&lt;/P&gt;&lt;P&gt;I've attached a picture so that you could get a better understanding.&lt;/P&gt;&lt;P&gt;Also, is it possible to merge cells with the same value in straight tables? (this is for aesthetic / readability purposes only, not really important)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;António&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 10:34:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1810674#M1212585</guid>
      <dc:creator>AFigueiredo</dc:creator>
      <dc:date>2021-05-26T10:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Min and Max values from selected dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811129#M1212634</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe change Source to be a dimension &amp;amp; just have 1 expression;&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL Mid(Number,3,3)),Max(TOTAL Mid(Number,3,3)))=Mid(Number,3,3),Mid(Number,3,3),Null())&lt;/P&gt;&lt;P&gt;So;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210527_1.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55841iC08D5CA6B3CA3BB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210527_1.png" alt="20210527_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I will have a think about the formatting, but not sure I've seen it done.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 16:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811129#M1212634</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-05-27T16:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Min and Max values from selected dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811145#M1212637</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So this is horrible and I am sure will break, but try it anyway.&lt;/P&gt;&lt;P&gt;Add a second expression (that you can then hide on Presentation tab;&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL Mid(Number,3,3)),Max(TOTAL Mid(Number,3,3)))=Mid(Number,3,3),&lt;BR /&gt;If(RowNo(TOTAL)=1,1,IF(Only(Name)&amp;lt;&amp;gt;Above(Only(Name),-1),1,0)),&lt;BR /&gt;Null())&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210527_2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55843i78E52FF8E3C2088A/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210527_2.png" alt="20210527_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then on Dimension tab refer to that field in the Text Color of Name dimension;&lt;/P&gt;&lt;P&gt;=if(Column(2)=1,Black(),White())&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210527_3.png" style="width: 994px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55844iA11DD5B4D95125E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210527_3.png" alt="20210527_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Might hold together, might do odd things depending on what else you do with it.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT&lt;/STRONG&gt; - you need to add back in the Name &amp;amp; Type field on the TOTAL;&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)),Max(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)))=Mid(Number,3,3),Mid(Number,3,3),Null())&lt;/P&gt;&lt;P&gt;IF(If(Type='Cat',Min(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)),Max(TOTAL &lt;STRONG&gt;&amp;lt;Name, Type&amp;gt;&lt;/STRONG&gt; Mid(Number,3,3)))=Mid(Number,3,3),&lt;BR /&gt;If(RowNo(TOTAL)=1,1,IF(Only(Name)&amp;lt;&amp;gt;Above(Only(Name),-1),1,0)),&lt;BR /&gt;Null())&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 18:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811145#M1212637</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-05-27T18:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Min and Max values from selected dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811318#M1212649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've accepted both this one and the first post as solutions, since I managed to work things out in terms of data management thanks to them.&lt;/P&gt;&lt;P&gt;I haven't tested the formatting expressions yet, but I'll give it a go whenever I can.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once again, I'm very thankful for your help!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;António&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 09:37:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-Max-values-from-selected-dimensions/m-p/1811318#M1212649</guid>
      <dc:creator>AFigueiredo</dc:creator>
      <dc:date>2021-05-28T09:37:50Z</dc:date>
    </item>
  </channel>
</rss>

