<?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: Understanding column in DAX function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499845#M69085</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380739" data-lia-user-login="beltalowda" class="lia-mention lia-mention-user"&gt;beltalowda&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;First of all this is most propobly need to be a column because otherwise you cannot use it to slice and filter your data.&amp;nbsp;&lt;BR /&gt;If you just want to disply the project name in the report as a measure then this can only happen when the filter context of the cell in your table or matrix visual contains only one project name. To do that you can use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;ProjectShortMeasure =
IF (
    HASONEVALUE ( Project[project_name] ),
    CONCATENATEX (
        Project,
        MID (
            Project[project_name],
            FIND ( "-", Project[project_name], FIND ( "/", Project[project_name],, 1 ), 1 ) + 1,
            5
        )
    )
)&lt;/LI-CODE&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;</description>
    <pubDate>Sat, 07 May 2022 12:21:08 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-05-07T12:21:08Z</dc:date>
    <item>
      <title>Understanding column in DAX function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499821#M69083</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some problem understanding how powerBI handles columns&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large dataset composing of multiple excel files. Each file describing one project. Each file is something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;task number&lt;/TD&gt;&lt;TD&gt;budget_time&lt;/TD&gt;&lt;TD&gt;plan_time&lt;/TD&gt;&lt;TD&gt;actual_hours&lt;/TD&gt;&lt;TD&gt;description&lt;/TD&gt;&lt;TD&gt;section&lt;/TD&gt;&lt;TD&gt;section_type&lt;/TD&gt;&lt;TD&gt;rig_name&lt;/TD&gt;&lt;TD&gt;project_name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;19,5&lt;/TD&gt;&lt;TD&gt;13,5&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;Move to location&lt;/TD&gt;&lt;TD&gt;Move to Location&lt;/TD&gt;&lt;TD&gt;Move/Mob/Demob&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;13,5&lt;/TD&gt;&lt;TD&gt;Anchor handling 2x vessels&lt;/TD&gt;&lt;TD&gt;Move to Location&lt;/TD&gt;&lt;TD&gt;Move/Mob/Demob&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;10,75&lt;/TD&gt;&lt;TD&gt;Space out riser joints and prepare for landing BOP&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;11,75&lt;/TD&gt;&lt;TD&gt;Land and latch BOP. Perform connector test. Meanwhile: Install UDF and WLR.&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;4,5&lt;/TD&gt;&lt;TD&gt;2,75&lt;/TD&gt;&lt;TD&gt;Cross circulate with MEG/SW, Ventilate HXT and annulus. Pressure test annulus.&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;24,75&lt;/TD&gt;&lt;TD&gt;RIH with MRT and latch onto ITC. Meanwhile install WLR&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;1,5&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3,25&lt;/TD&gt;&lt;TD&gt;Pressure test BOP on ITC run&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;2,5&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;POOH with MRT / ITC&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2,5&lt;/TD&gt;&lt;TD&gt;2,5&lt;/TD&gt;&lt;TD&gt;RIH with MSPT v2 to release TH plug&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;1,5&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2,25&lt;/TD&gt;&lt;TD&gt;Pressure test LPR&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;46&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;46&lt;/TD&gt;&lt;TD&gt;Release TH plug. Kill oil zone with closed GLV. POOH with plug. Note: added 32 hrs budget / PW ref change log&lt;/TD&gt;&lt;TD&gt;Permanent P&amp;amp;A (DP) w/ RIG&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;3,5&lt;/TD&gt;&lt;TD&gt;3,75&lt;/TD&gt;&lt;TD&gt;M/U punch and cut BHA&lt;/TD&gt;&lt;TD&gt;Punching&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;9,25&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;RIH to punch above and below prod, packer&lt;/TD&gt;&lt;TD&gt;Punching&lt;/TD&gt;&lt;TD&gt;P&amp;amp;A&lt;/TD&gt;&lt;TD&gt;Big O'l one&lt;/TD&gt;&lt;TD&gt;KRAKEN - EN 45/8-M-15 CY1H,DY1H,DY2H,DY3H - P&amp;amp;A, Drilling, Completion P&amp;amp;A, DRILLING, COMPLETION&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each file is much larger with alot more coloumn, but this is how its structured.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a shorter project name, and I am able to do this with a new column&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ProjectShortColoumn = 
MID(
    Project[project_name],FIND("-",Project[project_name], FIND("/",Project[project_name], ,1) 
    ,1)+1 ,5)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This return M-15 and thats perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT:&lt;/P&gt;&lt;P&gt;A more elegant solution would be to achive the same thing with DAX, but when I try to make a measure with the same structure it tells me that it cant find a single value for "project_name" in table Project.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does this not work, and how would I go by to produce the same result as with DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 11:42:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499821#M69083</guid>
      <dc:creator>beltalowda</dc:creator>
      <dc:date>2022-05-07T11:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding column in DAX function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499845#M69085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380739" data-lia-user-login="beltalowda" class="lia-mention lia-mention-user"&gt;beltalowda&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;First of all this is most propobly need to be a column because otherwise you cannot use it to slice and filter your data.&amp;nbsp;&lt;BR /&gt;If you just want to disply the project name in the report as a measure then this can only happen when the filter context of the cell in your table or matrix visual contains only one project name. To do that you can use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;ProjectShortMeasure =
IF (
    HASONEVALUE ( Project[project_name] ),
    CONCATENATEX (
        Project,
        MID (
            Project[project_name],
            FIND ( "-", Project[project_name], FIND ( "/", Project[project_name],, 1 ), 1 ) + 1,
            5
        )
    )
)&lt;/LI-CODE&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;</description>
      <pubDate>Sat, 07 May 2022 12:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499845#M69085</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-07T12:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding column in DAX function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499866#M69088</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A &lt;STRONG&gt;calculated column&lt;/STRONG&gt; in DAX, is a calculation made &lt;STRONG&gt;row by row&lt;/STRONG&gt; within your table and using the Row context of your table (granularity of one row). Knowing this, it is useless (in a calculated column) to specify the value you are using in the calculation, it will be the value of the current calculated row.&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;In theory because using DAX functions you can change the context, but that is another thing&lt;/EM&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whereas when you create a &lt;STRONG&gt;measure&lt;/STRONG&gt; there is &lt;STRONG&gt;no calculation&lt;/STRONG&gt; made, it will be made directly as you put your measure in a visual (table or chart). So the result will rely on the visual, if you make a table with year you have yearly results, if you make a table with catagory you have results by categories , or by month, project name...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when you create a measure, as the measure might have to agregate some values (rows), you need to specify how this agregation will be processed (SUM, MAX, MIN, SELECTEDVALUE for the value on the row of your visual...).&lt;/P&gt;&lt;P&gt;Another way of saying it would be, that &lt;STRONG&gt;measure are taking into account the whole column&lt;/STRONG&gt; so you need to specify which value you want in the column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it makes things more clear, and for the formula thanks to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 13:24:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2499866#M69088</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-05-07T13:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding column in DAX function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2500436#M69125</link>
      <description>&lt;P&gt;If it's just one value, then you don't really need CONCATENATEX.&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;ProjectShortMeasure =
VAR _Name = SELECTEDVALUE ( Project[project_name] )
RETURN
    MID ( _Name, FIND ( "-", _Name, FIND ( "/", _Name,, 1 ), 1 ) + 1, 5 )&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 08 May 2022 22:39:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2500436#M69125</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-05-08T22:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding column in DAX function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2501913#M69179</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks all for your replies.&lt;BR /&gt;This post have made me think alot on how I structure my reports, and I believe I am a little bit closer to understanding when to use measures and when a new coulumn is appropriate.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For the solution, the concatenatex function did give a calulateble solution, but for some edge cases it produced alot of duplicates. I did not spend to much time understanding why that happen and just went ahead and made a new coulumn with :&lt;/P&gt;&lt;PRE&gt;ProjectShortColoumn = 
MID(
    Project[project_name],FIND("-",Project[project_name], FIND("/",Project[project_name], ,1) 
    ,1)+1 ,5)&lt;/PRE&gt;&lt;P&gt;This is working flawlessly, so I understand now that there is no point in making a more complex calculation when a simple coloumn will be sufficent!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all your insight !&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 11:57:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-column-in-DAX-function/m-p/2501913#M69179</guid>
      <dc:creator>beltalowda</dc:creator>
      <dc:date>2022-05-09T11:57:30Z</dc:date>
    </item>
  </channel>
</rss>

