<?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 Ensuring that my measure also applies the filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3403626#M128598</link>
    <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the utilization of a team of people per period. But I am stuck with an error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables. One fact table that holds the time_spent value and a dimensions table that holds the total_capacity of the team member value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculation is fairly straigth forward:&amp;nbsp;&lt;/P&gt;&lt;P&gt;(time_spent / total_capacity) * 100%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my dax measure is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Utilization Percentage = CALCULATE(
    DIVIDE(
        SUM(tbl_1[time_spent]),
        SUM(tbl_2[total_capacity])), 
        ALLSELECTED('tbl_1')
    *100)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However this is giving me an "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the "ALLSELECTED" clause the code works but the measure does not take some filters into consideration. Giving me incorrect information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I essentially want is a measure that calculates the utilization % but still respects all the applied filters on the visual.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 06:50:03 GMT</pubDate>
    <dc:creator>BruceSV</dc:creator>
    <dc:date>2023-08-29T06:50:03Z</dc:date>
    <item>
      <title>Ensuring that my measure also applies the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3403626#M128598</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the utilization of a team of people per period. But I am stuck with an error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables. One fact table that holds the time_spent value and a dimensions table that holds the total_capacity of the team member value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculation is fairly straigth forward:&amp;nbsp;&lt;/P&gt;&lt;P&gt;(time_spent / total_capacity) * 100%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my dax measure is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Utilization Percentage = CALCULATE(
    DIVIDE(
        SUM(tbl_1[time_spent]),
        SUM(tbl_2[total_capacity])), 
        ALLSELECTED('tbl_1')
    *100)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However this is giving me an "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the "ALLSELECTED" clause the code works but the measure does not take some filters into consideration. Giving me incorrect information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I essentially want is a measure that calculates the utilization % but still respects all the applied filters on the visual.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 06:50:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3403626#M128598</guid>
      <dc:creator>BruceSV</dc:creator>
      <dc:date>2023-08-29T06:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that my measure also applies the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404053#M128613</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="489116" data-lia-user-login="BruceSV" class="lia-mention lia-mention-user"&gt;BruceSV&lt;/a&gt;&amp;nbsp;ALLSELECTED is most compex function in DAX.&lt;/P&gt;&lt;P&gt;Usually you should have&amp;nbsp; some aggregation in case of this error.&lt;/P&gt;&lt;P&gt;My question to you why in your ALLSELECTED you put table_1 as in CALCULCATE there are also table_2 and why it is *100) at end? Did you try pure ALLSELECTED ()?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 09:55:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404053#M128613</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-08-29T09:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that my measure also applies the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404198#M128627</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="489116" data-lia-user-login="BruceSV" class="lia-mention lia-mention-user"&gt;BruceSV&lt;/a&gt;&amp;nbsp;, I think you've put *100 in the wrong place..&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Utilization Percentage =
CALCULATE (
    DIVIDE ( SUM ( tbl_1[time_spent] ), SUM ( tbl_2[total_capacity] ) ) * 100,
    ALLSELECTED ( 'tbl_1' )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Aug 2023 10:57:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404198#M128627</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-08-29T10:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that my measure also applies the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404244#M128631</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="555045" data-lia-user-login="some_bih" class="lia-mention lia-mention-user"&gt;some_bih&lt;/a&gt;&amp;nbsp;- I have tried this but that doesn't work unfortunately.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 11:21:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404244#M128631</guid>
      <dc:creator>BruceSV</dc:creator>
      <dc:date>2023-08-29T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that my measure also applies the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404248#M128632</link>
      <description>&lt;P&gt;Although the syntax is approved the results are not what I expected. The measure now doesnt apply the legend anymore.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit - It actually did work and surfaces a different problem, need to update my data model. Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 11:28:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ensuring-that-my-measure-also-applies-the-filter/m-p/3404248#M128632</guid>
      <dc:creator>BruceSV</dc:creator>
      <dc:date>2023-08-29T11:28:41Z</dc:date>
    </item>
  </channel>
</rss>

