<?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 Use function for entire table. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702301#M81841</link>
    <description>&lt;P&gt;I have a table with all measurements of all people. Its based out of Company names and normal names. In the first function I want to get a list of alle people from a selected company with the lowest apointmentNumber.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This list is calculated with the folowing function:&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;FirstValue =
VAR selectie =
    SELECTEDVALUE ( company[Name] )
VAR EersteWaarde =
    CALCULATE (
        MIN ( usermeasurements[AppointmentId] ),
        FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] ),
        FILTER ( usermeasurements, usermeasurements[users.company.Name] = selectie )
    )
RETURN
    EersteWaarde&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this part&amp;nbsp; I want to select all first values from the selected Company. This part is only working when I connect this function with a name list of the company. I want to use all first values in the folowing function to calculate some output:&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;GemiddeldeLichaamssamenstellingEerste =
VAR selectie =
    ADDCOLUMNS (
        VALUES ( company[Name] ),
        "EersteWaarde",
            CALCULATE (
                MIN ( usermeasurements[AppointmentId] ),
                FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] )
            )
    )
VAR LS =
    CALCULATE (
        AVERAGE ( usermeasurements[BodyCompositionOverall] ),
        TREATAS (
            selectie,
            usermeasurements[users.company.Name],
            usermeasurements[appointments.AppointmentNumber]
        )
    )
RETURN
    COALESCE ( LS / 10, 0 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i want the table as mentioned earlier as input to calculate some averages of that selection (so the given apointmentID's)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the result I want. So some selected names and FirstValues. From those Values I need to calculate some averages.&lt;/P&gt;&lt;P&gt;How can I deal with this?&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 08:56:58 GMT</pubDate>
    <dc:creator>DionTN</dc:creator>
    <dc:date>2022-08-16T08:56:58Z</dc:date>
    <item>
      <title>Use function for entire table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702301#M81841</link>
      <description>&lt;P&gt;I have a table with all measurements of all people. Its based out of Company names and normal names. In the first function I want to get a list of alle people from a selected company with the lowest apointmentNumber.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This list is calculated with the folowing function:&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;FirstValue =
VAR selectie =
    SELECTEDVALUE ( company[Name] )
VAR EersteWaarde =
    CALCULATE (
        MIN ( usermeasurements[AppointmentId] ),
        FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] ),
        FILTER ( usermeasurements, usermeasurements[users.company.Name] = selectie )
    )
RETURN
    EersteWaarde&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this part&amp;nbsp; I want to select all first values from the selected Company. This part is only working when I connect this function with a name list of the company. I want to use all first values in the folowing function to calculate some output:&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;GemiddeldeLichaamssamenstellingEerste =
VAR selectie =
    ADDCOLUMNS (
        VALUES ( company[Name] ),
        "EersteWaarde",
            CALCULATE (
                MIN ( usermeasurements[AppointmentId] ),
                FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] )
            )
    )
VAR LS =
    CALCULATE (
        AVERAGE ( usermeasurements[BodyCompositionOverall] ),
        TREATAS (
            selectie,
            usermeasurements[users.company.Name],
            usermeasurements[appointments.AppointmentNumber]
        )
    )
RETURN
    COALESCE ( LS / 10, 0 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i want the table as mentioned earlier as input to calculate some averages of that selection (so the given apointmentID's)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the result I want. So some selected names and FirstValues. From those Values I need to calculate some averages.&lt;/P&gt;&lt;P&gt;How can I deal with this?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 08:56:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702301#M81841</guid>
      <dc:creator>DionTN</dc:creator>
      <dc:date>2022-08-16T08:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use function for entire table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702492#M81849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="415309" data-lia-user-login="DionTN" class="lia-mention lia-mention-user"&gt;DionTN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not able to follow this. Would you mind if you rephrased the question, please? It would also be nice if you could format the code properly (&lt;A href="http://www.daxformatter.com" target="_blank" rel="noopener"&gt;www.daxformatter.com&lt;/A&gt;) before pasting. It's almost impossible to read this as it is right now. If you could paste some pictures of what it is you want, that would also help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 08:44:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702492#M81849</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-16T08:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use function for entire table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702538#M81852</link>
      <description>&lt;P&gt;I changed my question. Hopefully you can help me.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 08:55:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2702538#M81852</guid>
      <dc:creator>DionTN</dc:creator>
      <dc:date>2022-08-16T08:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use function for entire table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2703145#M81886</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="349489" data-lia-user-login="daXtreme" class="lia-mention lia-mention-user"&gt;daXtreme&lt;/a&gt;Can you do something with it?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 12:50:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-function-for-entire-table/m-p/2703145#M81886</guid>
      <dc:creator>DionTN</dc:creator>
      <dc:date>2022-08-16T12:50:10Z</dc:date>
    </item>
  </channel>
</rss>

