<?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: Passing a column inside a VAR on Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302600#M56902</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292943" data-lia-user-login="v-angzheng-msft" class="lia-mention lia-mention-user"&gt;v-angzheng-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't work :S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2022 08:41:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-01-26T08:41:41Z</dc:date>
    <item>
      <title>Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2295536#M56575</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have this measure: # Products OOS = CALCULATE(DISTINCTCOUNT('Product'[Config_ID]), 'Product'[Stock Max date] = 0)&lt;/P&gt;&lt;P&gt;That has inside:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'Product'[Config_ID] -&amp;gt; Non-calculated column&lt;/LI&gt;&lt;LI&gt;'Product'[Stock Max date] -&amp;gt; Calculated column&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to pass 'Product'[Stock Max date] to a variable inside the measure # Products OOS. Can you help me?&lt;BR /&gt;&lt;BR /&gt;Stock Max date = CALCULATE(SUM('Stock'[stock_quantity]),&amp;nbsp; FILTER('Dim Date', 'Dim Date'[Date] = MAX('Dim Date'[Date])))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What am I trying?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 11:47:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2295536#M56575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-21T11:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2295553#M56576</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;, this part of your sode is not working "stock_max_date = 0".&amp;nbsp; The reason is the stock_max_date is a Table; not a value.&amp;nbsp; You would need to change to something like "FILTER ( stock_max_date ,&amp;nbsp; [xD] = 0 )".&amp;nbsp; See if this works.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 12:00:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2295553#M56576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-21T12:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2297307#M56644</link>
      <description>&lt;P&gt;HI&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ADDCOLUMNS is a tabular function and will return a table so you can not use that VAR in your calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read this:&amp;nbsp;&lt;A href="https://radacad.com/power-bi-dax-back-to-basics-scalar-vs-tabular-functions" target="_blank" rel="noopener"&gt;https://radacad.com/power-bi-dax-back-to-basics-scalar-vs-tabular-functions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can yoiu share a sample of your data in a text format with relationships between your tables along with the expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank" rel="noopener"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 22:02:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2297307#M56644</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2022-01-23T22:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2298043#M56667</link>
      <description>&lt;P&gt;Any suggestion on how to pass the calculated column to the variable ? Having hard time to filtet using slicers, because i am using calculated columns&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 08:15:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2298043#M56667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-24T08:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2300305#M56800</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;/P&gt;
&lt;LI-CODE lang="ruby"&gt;# Products OOS =
VAR Stock_Max_date =
    ADDCOLUMNS(
        stock,
        "xD",
            CALCULATE(
                SUM( 'Stock'[stock_quantity] ),
                FILTER( 'Dim Date', 'Dim Date'[Date] = MAX( 'Dim Date'[Date] ) )
            )
    )
VAR Products_OOS =
    CALCULATE(
        DISTINCTCOUNT( 'Product'[Config_ID] ),
        FILTER( Stock_Max_date, [xD] = 1 )
    )
RETURN
    Products_OOS
&lt;/LI-CODE&gt;
&lt;P&gt;If this doesn't work for you, could you please consider sharing more details about it.&lt;BR /&gt;It makes it easier to give you a solution.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Sample (dummy dataset) data as text, use the table tool in the editing bar&lt;/LI&gt;
&lt;LI&gt;Expected output from sample data&lt;/LI&gt;
&lt;LI&gt;Explanation in words of how to get from 1. to 2.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Zeon Zheng&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 07:22:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2300305#M56800</guid>
      <dc:creator>v-angzheng-msft</dc:creator>
      <dc:date>2022-01-25T07:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2301523#M56851</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292943" data-lia-user-login="v-angzheng-msft" class="lia-mention lia-mention-user"&gt;v-angzheng-msft&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You don't know how incredible you are!!&lt;BR /&gt;Still have this issue with the below:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have three CALCULATED COLUMNS :&lt;/P&gt;&lt;P&gt;average_is = CALCULATE(SUM(Sales[DF Items]), ALLSELECTED(ProdSup[Config_ID])) / 60&lt;BR /&gt;stock_max_date = CALCULATE(SUM('Stock'[stock_quantity]), FILTER('Dim Date', 'Dim Date'[Date] = MAX('Dim Date'[Date])))&lt;BR /&gt;flg_low_14d = IF(AND('Product'[Average IS]*14 &amp;gt; 'Product'[Stock Max date],'Product'[Stock Max date]&amp;gt;0) , 1, 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEASURE:&lt;/P&gt;&lt;P&gt;# Prod coverage&amp;lt;14D = SUM('Product'[FLG_Low_14D])&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How can I pass this inside a variable?&lt;/P&gt;&lt;P&gt;What I'm trying:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:23:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2301523#M56851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-25T16:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302056#M56878</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR prod_coverage_14d=SUMX(flg_low_14d,[@xD])
RETURN prod_coverage_14d&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Zeon Zheng&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 01:34:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302056#M56878</guid>
      <dc:creator>v-angzheng-msft</dc:creator>
      <dc:date>2022-01-26T01:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302600#M56902</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292943" data-lia-user-login="v-angzheng-msft" class="lia-mention lia-mention-user"&gt;v-angzheng-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't work :S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 08:41:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302600#M56902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-26T08:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302614#M56903</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;IF ( AND(@average *14 &amp;gt; @stock_max, @stock_max &amp;gt;0),1,0)&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team _ Zeon Zheng&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 08:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302614#M56903</guid>
      <dc:creator>v-angzheng-msft</dc:creator>
      <dc:date>2022-01-26T08:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302916#M56924</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292943" data-lia-user-login="v-angzheng-msft" class="lia-mention lia-mention-user"&gt;v-angzheng-msft&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Kind odd, but doesn't work. It only recognizes the VAR average_is&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 11:58:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2302916#M56924</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-26T11:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2304047#M56997</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please consider sharing more details about it&amp;nbsp;and posting expected result so it is clear on what needs to be implemented?&amp;nbsp; And It would be great if there is a sample file without any sesentive information here.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=04%7C01%7Cv-angzheng%40microsoft.com%7C924dd765ec384b65688e08d9bf740b47%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637751327400778983%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;amp;sdata=%2F3eY6yfbNH%2FaWWzVDJpR%2Ft65WRbE0yPyljzS8ZOYLX4%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It makes it easier to give you a solution.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Sample (dummy dataset) data as text, use the table tool in the editing bar&lt;/LI&gt;
&lt;LI&gt;Expected output from sample data&lt;/LI&gt;
&lt;LI&gt;Explanation in words of how to get from 1. to 2.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Zeon Zheng&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 01:22:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2304047#M56997</guid>
      <dc:creator>v-angzheng-msft</dc:creator>
      <dc:date>2022-01-27T01:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2305120#M57044</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292943" data-lia-user-login="v-angzheng-msft" class="lia-mention lia-mention-user"&gt;v-angzheng-msft&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to remark, my main goal with this is to make some slicers work(Fullfillment type slicer from stock doesnt work because of the calculated columns).&lt;/P&gt;&lt;P&gt;You can find in the link below the sample:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://drive.google.com/file/d/179Y7Noh6djo0jxOgW2TDcAlNQxsc69Ir/view?usp=sharing" target="_self"&gt;sample&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks sir&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 12:25:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2305120#M57044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-27T12:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a column inside a VAR on Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2306797#M57161</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;LI-CODE lang="ruby"&gt;VAR _average_is =
    ADDCOLUMNS(
        'Product',
        "@average", CALCULATE( SUM( Sales[DF Items] ), ALLSELECTED( ProdSup[Config_ID] ) ) / 60,
        "@stock_max",
            CALCULATE(
                SUM( 'Stock'[stock_quantity] ),
                FILTER( 'Dim_Date', 'Dim_Date'[Date] = MAX( 'Dim_Date'[Date] ) )
            )
    )
VAR _flg_low_14d =
    ADDCOLUMNS(
        _average_is,
        "@xD",
            IF( AND( [@average] * 14 &amp;gt; [@stock_max], [@stock_max] &amp;gt; 0 ), 1, 0 )
    )
VAR prod_coverage_14d =
    SUMX(_flg_low_14d,[@xD])
RETURN
    prod_coverage_14d&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Zeon Zheng&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 04:38:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-column-inside-a-VAR-on-Dax/m-p/2306797#M57161</guid>
      <dc:creator>v-angzheng-msft</dc:creator>
      <dc:date>2022-01-28T04:38:18Z</dc:date>
    </item>
  </channel>
</rss>

