<?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: ISINSCOPE &amp;amp; SELECTEDVALUE for 2-level hierarchies (2 columns) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554568#M30778</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250348" data-lia-user-login="crln-blue" class="lia-mention lia-mention-user"&gt;crln-blue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi there. Apologies since I'm slightly confused as to what the final outcome should be. Can you post an example of the visual you wish to create including this new measure ?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 17:39:34 GMT</pubDate>
    <dc:creator>PaulDBrown</dc:creator>
    <dc:date>2020-12-16T17:39:34Z</dc:date>
    <item>
      <title>ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554478#M30770</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a fact table (summarized) using DAX with the ff columns:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Categories&lt;/TD&gt;&lt;TD&gt;Item ID&lt;/TD&gt;&lt;TD&gt;Parent ID&lt;/TD&gt;&lt;TD&gt;Dates&lt;/TD&gt;&lt;TD&gt;Amount&lt;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t;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;458&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;36734&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;364&lt;/TD&gt;&lt;TD&gt;7 | 6&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;H&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;464&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;H&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I created a single measure for all of the computations of the categories.&lt;BR /&gt;I used SELECTEDVALUE on a SWITCH statement:&lt;/P&gt;&lt;P&gt;Measure = SWITCH(SELECTEDVALUE(Level 2), get the each child values&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My concern is, how about the parents' values? My parent categories has a different formulas for each (not sum, more on subtracting). For example&lt;/P&gt;&lt;P&gt;A = F - B&lt;/P&gt;&lt;P&gt;H = E - F&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But upon searching I stumbled upon ISINSCOPE where the calculations will be computed per column level. (&lt;A href="https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/" target="_blank"&gt;Use IsInScope to get the right hierarchy level in DAX - Kasper On BI&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;Is there a way to use SELECTEDVALUE for two columns in a single measure?&amp;nbsp;&lt;BR /&gt;Or for ISINSCOPE, can I filted the column for each value? For example:&lt;BR /&gt;ISINSCOPE(level2) = A&lt;BR /&gt;&lt;BR /&gt;(Not sure if I should post it here or on Desktop category)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edited: sorry for the confusion. My current problem was SELECTEDVALUE but I was also thinking about using ISINSCOPE and how would I do it. Thanks again&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 18:12:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554478#M30770</guid>
      <dc:creator>crln-blue</dc:creator>
      <dc:date>2020-12-16T18:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554568#M30778</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250348" data-lia-user-login="crln-blue" class="lia-mention lia-mention-user"&gt;crln-blue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi there. Apologies since I'm slightly confused as to what the final outcome should be. Can you post an example of the visual you wish to create including this new measure ?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 17:39:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554568#M30778</guid>
      <dc:creator>PaulDBrown</dc:creator>
      <dc:date>2020-12-16T17:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554660#M30781</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24542" data-lia-user-login="PaulDBrown" class="lia-mention lia-mention-user"&gt;PaulDBrown&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for the question, I read it again and you're right. It's quiet confusing. I edited my post. My real concerns are the ff: using ISINSCOPE but the column is filtered and using SELECTEDVALUE in two tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on my research, seems like ISINSCOPE is the best way but another problem will arise if I segregate my data levels into many level columns - sorting of my hierarchy (a bit off topic). So I was hoping if I can use ISINSCOPE but the column is filtered to a value I desire (for computation purposes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I'm also checking SELECTEDVALUE but when I add on the formulas, it doesn't seem to do so that's why it's blank on the matrix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a sample visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 18:18:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1554660#M30781</guid>
      <dc:creator>crln-blue</dc:creator>
      <dc:date>2020-12-16T18:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1557121#M30869</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250348" data-lia-user-login="crln-blue" class="lia-mention lia-mention-user"&gt;crln-blue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies again, but I am still struggling to understand what the final output should be. Could you mockup up a sample in Excel showing the original table, the calculation and the final output expected?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 16:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1557121#M30869</guid>
      <dc:creator>PaulDBrown</dc:creator>
      <dc:date>2020-12-17T16:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1557563#M30881</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24542" data-lia-user-login="PaulDBrown" class="lia-mention lia-mention-user"&gt;PaulDBrown&lt;/a&gt;&amp;nbsp;! I apologize for the confusion. Here's my sample file from &lt;A href="https://github.com/crln-blue/samplepbix/blob/main/isinscope%20-%20selected%20value%20issue.pbix" target="_self"&gt;Github&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Below is my data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I don;t know the right approach of this. I have parent categories where its formula is a subtraction formula. But SELECTEDVALUE only adds up using the SUM function or SUMX.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 19:45:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1557563#M30881</guid>
      <dc:creator>crln-blue</dc:creator>
      <dc:date>2020-12-17T19:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1559448#M30931</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250348" data-lia-user-login="crln-blue" class="lia-mention lia-mention-user"&gt;crln-blue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the sample PBIX. It makes things much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if this is what you need:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;I've attached the PBIX file for you&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 12:11:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1559448#M30931</guid>
      <dc:creator>PaulDBrown</dc:creator>
      <dc:date>2020-12-18T12:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: ISINSCOPE &amp; SELECTEDVALUE for 2-level hierarchies (2 columns)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1559597#M30936</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24542" data-lia-user-login="PaulDBrown" class="lia-mention lia-mention-user"&gt;PaulDBrown&lt;/a&gt;&amp;nbsp;! Thank you very much!&lt;BR /&gt;I'm currently checking it now and currently studying it (will get back to you for more questions).&lt;/P&gt;&lt;P&gt;Anyhow, I'm curious to this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Model View, it seems like a table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But its logo under the Fields menu of the Data View is not a table. It's my first time seeing this (still a bit new to PowerBI). What does it call and how do you do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for all the help!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 13:40:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ISINSCOPE-amp-SELECTEDVALUE-for-2-level-hierarchies-2-columns/m-p/1559597#M30936</guid>
      <dc:creator>crln-blue</dc:creator>
      <dc:date>2020-12-18T13:40:14Z</dc:date>
    </item>
  </channel>
</rss>

