<?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: Debugging DAX Calculations (teach to fish) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614423#M139740</link>
    <description>&lt;P&gt;Thanks but that is part of the problem. The blogs do a good enough job of explaining the functions but not of showing how to validate functions are working as expected.&lt;BR /&gt;&lt;BR /&gt;I think I developed some stuff in the last couple of hours that has helped but would love to hear anyone elses tricks patterns they use.&lt;BR /&gt;&lt;BR /&gt;How to see values of a single column table output, within the context of a dimension?&lt;BR /&gt;&amp;nbsp;- Create table visual, drag a dimension column in first.&lt;BR /&gt;&amp;nbsp;- Create a new measure where you copy paste your table expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Wrap that table expression in concatentatex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- I want to evaluate these results of var _filter so I'll write measure [test_filter]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;--here is the table variable from a much longer measure to evalute in a specific context:
var _filter = 
       FILTER(
            ALLSELECTED(
                Month[Fiscal Month Num Of Year]
            ),
            Month[Fiscal Month Num Of Year]
            &amp;lt;= selectedvalue( Month[Fiscal Month Num Of Year], 12 )
        )

--we write a new measure that looks like the following with concatenatex wrapping:
test5 filterv2 = 
    CONCATENATEX(
        FILTER(
            ALLSELECTED(
                Month[Fiscal Month Num Of Year]
            ),
            Month[Fiscal Month Num Of Year]
            &amp;lt;= selectedvalue( Month[Fiscal Month Num Of Year], 12 )
        ),
        'Month'[Fiscal Month Num Of Year],
        "-")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result looks like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 03:00:20 GMT</pubDate>
    <dc:creator>AxiomaticTwo</dc:creator>
    <dc:date>2024-01-04T03:00:20Z</dc:date>
    <item>
      <title>Debugging DAX Calculations (teach to fish)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614216#M139734</link>
      <description>&lt;P&gt;I'm in some complicated stuff and I can't visuzualize what is going on under the hood of DAX.&amp;nbsp; Can you answer or point me to a blog, video, etc. that will allow me to help myself see that what I assume is actually happening. This is regarding shadow filters, context transition, initial filter context, and revised filter context.&lt;BR /&gt;&lt;BR /&gt;I know I should be able to use a combination of EVALUATE and DEFINE and I have for simple things, but when I'm trying to recreate a table in a Power BI report in Tabular Editor with a DAX Query I'm finding it difficult.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;TL;DR when I write the following DAX code how can I pick apart each section to visualize it using DAX Studio or Tabular Editor or Calculated Tables in PBIX even.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var _filter = 
    FILTER(
        ALLSELECTED ( 'Month'[Fiscal Year ID] ),
        'Month' [Fiscal Year ID] = MAX( 'Month'[Fiscal Year ID] ))

VAR _OpenStores =
        CALCULATETABLE (
            FILTER (
                ALLSELECTED ( 'tblQualifies'[StoreID] ),      
                CALCULATE ( SELECTEDVALUE ( 'tblQualifies'[Qualifies]) 
                )  
                = 1                             
            )
            ,_filter &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Thanks in advance if you are able to help.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 23:31:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614216#M139734</guid>
      <dc:creator>AxiomaticTwo</dc:creator>
      <dc:date>2024-01-03T23:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging DAX Calculations (teach to fish)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614363#M139736</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621297" data-lia-user-login="AxiomaticTwo" class="lia-mention lia-mention-user"&gt;AxiomaticTwo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found a couple of resources that might be helpful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-context-transition/" target="_blank"&gt;Understanding Context Transition - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/" target="_blank"&gt;The definitive guide to ALLSELECTED - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/context-transition-and-filters-in-calculate/" target="_blank"&gt;Context Transition and Filters in CALCULATE - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/introduction-to-filter-context-in-power-bi/" target="_blank"&gt;Introduction to Filter Context in Power BI (enterprisedna.co)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/power-bi-filters-invoking-context-transitions/" target="_blank"&gt;Power BI Filters: Invoking Context Transitions (enterprisedna.co)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Debugging Strategy: Break down your DAX expressions into smaller parts and test each part individually. This will help you isolate and understand the behavior of each component of your DAX formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 02:37:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614363#M139736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-04T02:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging DAX Calculations (teach to fish)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614423#M139740</link>
      <description>&lt;P&gt;Thanks but that is part of the problem. The blogs do a good enough job of explaining the functions but not of showing how to validate functions are working as expected.&lt;BR /&gt;&lt;BR /&gt;I think I developed some stuff in the last couple of hours that has helped but would love to hear anyone elses tricks patterns they use.&lt;BR /&gt;&lt;BR /&gt;How to see values of a single column table output, within the context of a dimension?&lt;BR /&gt;&amp;nbsp;- Create table visual, drag a dimension column in first.&lt;BR /&gt;&amp;nbsp;- Create a new measure where you copy paste your table expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Wrap that table expression in concatentatex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- I want to evaluate these results of var _filter so I'll write measure [test_filter]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;--here is the table variable from a much longer measure to evalute in a specific context:
var _filter = 
       FILTER(
            ALLSELECTED(
                Month[Fiscal Month Num Of Year]
            ),
            Month[Fiscal Month Num Of Year]
            &amp;lt;= selectedvalue( Month[Fiscal Month Num Of Year], 12 )
        )

--we write a new measure that looks like the following with concatenatex wrapping:
test5 filterv2 = 
    CONCATENATEX(
        FILTER(
            ALLSELECTED(
                Month[Fiscal Month Num Of Year]
            ),
            Month[Fiscal Month Num Of Year]
            &amp;lt;= selectedvalue( Month[Fiscal Month Num Of Year], 12 )
        ),
        'Month'[Fiscal Month Num Of Year],
        "-")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result looks like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 03:00:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Debugging-DAX-Calculations-teach-to-fish/m-p/3614423#M139740</guid>
      <dc:creator>AxiomaticTwo</dc:creator>
      <dc:date>2024-01-04T03:00:20Z</dc:date>
    </item>
  </channel>
</rss>

