<?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: Efficiency percentage from multiple criteria. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2689098#M80901</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417577" data-lia-user-login="A-Aron" class="lia-mention lia-mention-user"&gt;A-Aron&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please new a calculated column:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Potential hours = 
VAR _countrows =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            'Table',
            'Table'[Date] = EARLIER ( 'Table'[Date] )
                &amp;amp;&amp;amp; 'Table'[Location] = EARLIER ( 'Table'[Location] )
        )
    )
VAR _result = 
SWITCH(
    'Table'[Location],
    "Brim",DIVIDE(12.5,_countrows),
    "Neo",DIVIDE(17,_countrows),
    "Vic",DIVIDE(14,_countrows)
)
RETURN
    _result&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The PBIX file is attached for reference.&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1xkYzosEsxoJsAIIWP5Wvncezk18sUCZU/view?usp=sharing" target="_blank" rel="noopener"&gt;PBIX file&lt;/A&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;changqing&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2022 08:07:06 GMT</pubDate>
    <dc:creator>changqing</dc:creator>
    <dc:date>2022-08-09T08:07:06Z</dc:date>
    <item>
      <title>Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678409#M80104</link>
      <description>&lt;P&gt;Hello friends i hope i can explain this clearly,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the sample table below that logs work records from multiple combined tables. Each location has hours worked and a potential of hours that i have specified. I need to create a way to calculate an efficiency percentage that filters by site. There are multiple entries per date per site so i need to figure out how to count the multiple days filtered by site then divide the potential hours which is specified by the count of each day. For example; Brim have a total of 12.5 possible hours per day. They logged 3 entries for Date 1/1 for a total of 4 hours. Im trying to get potential hours column to count the amount of entries for date 1/1 then divide 12.5 by how many the count of date is to get 4.1 in each row so i can use for a filter.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Hours worked&lt;/TD&gt;&lt;TD&gt;Potential hours&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Brim&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;VAR BR = COUNTROWS(date)&lt;/P&gt;&lt;P&gt;=IF(Location='Brim', BR/12.5) IF(Location='Neo', BR/17)&lt;/P&gt;&lt;P&gt;IF(Location='Vic', BR/14)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Brim&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Brim&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Neo&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Neo&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Neo&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Vic&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Vic&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1&lt;/TD&gt;&lt;TD&gt;Vic&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 11:23:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678409#M80104</guid>
      <dc:creator>A-Aron</dc:creator>
      <dc:date>2022-08-03T11:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678444#M80108</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417577" data-lia-user-login="A-Aron" class="lia-mention lia-mention-user"&gt;A-Aron&lt;/a&gt;&amp;nbsp;is this the result you want to get?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;VAR BR = COUNTROWS(date)&lt;/P&gt;&lt;P&gt;=IF(Location='Brim', BR/12.5) IF(Location='Neo', BR/17)&lt;/P&gt;&lt;P&gt;IF(Location='Vic', BR/14)&lt;BR /&gt;&lt;BR /&gt;What is this code? or it's just a logic?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 11:34:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678444#M80108</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-08-03T11:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678495#M80110</link>
      <description>&lt;P&gt;its code that i have tried but doesnt work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 11:50:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678495#M80110</guid>
      <dc:creator>A-Aron</dc:creator>
      <dc:date>2022-08-03T11:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678524#M80112</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417577" data-lia-user-login="A-Aron" class="lia-mention lia-mention-user"&gt;A-Aron&lt;/a&gt;&amp;nbsp;can you hard code the results for that column? Didn't fully understand what you want to get.&lt;BR /&gt;Also, do you want to this as a calculated column or as a measure to put in table visuals?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 11:57:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678524#M80112</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-08-03T11:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678554#M80114</link>
      <description>&lt;P&gt;Im not sure how to go about it. I have the hours they actually worked in a table, and i know what the potential should be but i can't link the potential to the location per row so that the location filter shows the change in potential vs actual. So im trying to take the hours worked in a single day divided by what the potential is to get their efficiency, the problem for me is that they make multiple entries in one day. I figure if i count the entries in one day then divide that count by the potential it will split up the potential evenly over the rows so that itll link to the location to make the filter work. sorry im not great at trying to explain&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 12:05:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678554#M80114</guid>
      <dc:creator>A-Aron</dc:creator>
      <dc:date>2022-08-03T12:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678603#M80118</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417577" data-lia-user-login="A-Aron" class="lia-mention lia-mention-user"&gt;A-Aron&lt;/a&gt;&amp;nbsp;no worries, do you want to show me on a quick zoom call?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 12:23:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678603#M80118</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-08-03T12:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678627#M80119</link>
      <description>&lt;P&gt;Im sorry i dont have zoom im on a work laptop so i cant download things. Maybe i can, i have this table where the hours per location is logged. I have the visual as doughnut chart to show efficiency percentage but i would like it to change when i filter the location slicer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 12:33:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678627#M80119</guid>
      <dc:creator>A-Aron</dc:creator>
      <dc:date>2022-08-03T12:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678629#M80120</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417577" data-lia-user-login="A-Aron" class="lia-mention lia-mention-user"&gt;A-Aron&lt;/a&gt;&amp;nbsp;I think I myawlf will need to look at it with but maybe someone else here could pick it up from the data provided. Better to open a neq question and delete this one&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 12:36:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2678629#M80120</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-08-03T12:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2689098#M80901</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417577" data-lia-user-login="A-Aron" class="lia-mention lia-mention-user"&gt;A-Aron&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please new a calculated column:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Potential hours = 
VAR _countrows =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            'Table',
            'Table'[Date] = EARLIER ( 'Table'[Date] )
                &amp;amp;&amp;amp; 'Table'[Location] = EARLIER ( 'Table'[Location] )
        )
    )
VAR _result = 
SWITCH(
    'Table'[Location],
    "Brim",DIVIDE(12.5,_countrows),
    "Neo",DIVIDE(17,_countrows),
    "Vic",DIVIDE(14,_countrows)
)
RETURN
    _result&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The PBIX file is attached for reference.&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1xkYzosEsxoJsAIIWP5Wvncezk18sUCZU/view?usp=sharing" target="_blank" rel="noopener"&gt;PBIX file&lt;/A&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;changqing&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 08:07:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2689098#M80901</guid>
      <dc:creator>changqing</dc:creator>
      <dc:date>2022-08-09T08:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency percentage from multiple criteria.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2690312#M80980</link>
      <description>&lt;P&gt;This worked thank you very much!!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 14:39:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Efficiency-percentage-from-multiple-criteria/m-p/2690312#M80980</guid>
      <dc:creator>A-Aron</dc:creator>
      <dc:date>2022-08-09T14:39:07Z</dc:date>
    </item>
  </channel>
</rss>

