<?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: Distributing Hours to the facilities from a Facility. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669388#M142300</link>
    <description>&lt;P&gt;Hi Parry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would prefer dax over PQ however, i am keen ko learn how would it be done in PQ, the hours can be divided in equal portions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Very Much !!&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 03:40:43 GMT</pubDate>
    <dc:creator>Rabi</dc:creator>
    <dc:date>2024-01-31T03:40:43Z</dc:date>
    <item>
      <title>Distributing Hours to the facilities from a Facility.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669097#M142286</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me with the following issue:&lt;/P&gt;&lt;P&gt;I used this dax to calculate the Maintenance Hours&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;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Maintenance Hours (Head Office) =
           var Hours= CALCULATE( SUM (Table A [Hours] )
          , Table A [Department] IN { "Maintenance" },
          Table A '[Village Name]="Head Office") 
return 
CALCULATE(Hours,REMOVEFILTERS(Table A[Village Name]))&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Now i need to distribute the resulting hours from above dax to other villages, i used the following dax but its not working as i have specified the Head Office in above dax, how can i make the resuting hours from above dax to act as hard value. I am distributing the hours based on the bed capacity of the villages&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;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Head Office distribution Maintenance = 
VAR totalbed = CALCULATE(SUM(Table B[Bed Capacity]),
 ALLSELECTED(TABLE A[Village Name]))

VAR EachFacilityBeds = SUM(Table B[Bed Capacity])
RETURN
[Maintenance Hours (Head Office)]*EachFacilityBeds)/totalbed&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following Measure in a matrix but it doesnt give me the distributed hours, If i use the hard value like below then i get the corrrect distribution&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;LI-CODE lang="markup"&gt;Head Office distribution Maintenance = 
VAR totalbed = CALCULATE(SUM(Table B[Bed Capacity]),
 ALLSELECTED(TABLE A[Village Name]))

VAR EachFacilityBeds = SUM(Table B[Bed Capacity])
RETURN
(3500*bed)/totalbed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3500 is the resulting value from the first measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507" data-lia-user-login="parry2k" class="lia-mention lia-mention-user"&gt;parry2k&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 23:36:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669097#M142286</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-01-30T23:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distributing Hours to the facilities from a Facility.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669157#M142288</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="609564" data-lia-user-login="Rabi" class="lia-mention lia-mention-user"&gt;Rabi&lt;/a&gt;&amp;nbsp;very hard to tell what you are trying to achieve. It will be easier if you throw a sample pbix file or sample data with the expected output. Measures are not explaining much, at least to me. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 00:28:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669157#M142288</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2024-01-31T00:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Distributing Hours to the facilities from a Facility.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669163#M142289</link>
      <description>&lt;P&gt;Hi Parry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the sample data,&lt;/P&gt;&lt;P&gt;I want to Distribute the 40 hours from Head office to the villages A,B,C,D,E, The result would be 8 hours distributed to each villages. I have used same logic above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !!&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;Facility&lt;/TD&gt;&lt;TD&gt;Job Title&lt;/TD&gt;&lt;TD&gt;Worked Hrs&lt;/TD&gt;&lt;TD&gt;Amount&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Maintenance&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Maintenance&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Maintenance&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Maintenance&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Maintenance&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Head Office&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Maintenance&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 31 Jan 2024 00:43:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669163#M142289</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-01-31T00:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Distributing Hours to the facilities from a Facility.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669242#M142293</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="609564" data-lia-user-login="Rabi" class="lia-mention lia-mention-user"&gt;Rabi&lt;/a&gt;&amp;nbsp;40 hours from h/o distributed to other facilities in equal portion or there are other strings attached?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 02:19:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669242#M142293</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2024-01-31T02:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Distributing Hours to the facilities from a Facility.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669253#M142295</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="609564" data-lia-user-login="Rabi" class="lia-mention lia-mention-user"&gt;Rabi&lt;/a&gt;&amp;nbsp;also do you want these as columns or measures? If you want columns I would do it in PQ, but if need measures then of course it will be DAX.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 02:27:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669253#M142295</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2024-01-31T02:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distributing Hours to the facilities from a Facility.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669388#M142300</link>
      <description>&lt;P&gt;Hi Parry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would prefer dax over PQ however, i am keen ko learn how would it be done in PQ, the hours can be divided in equal portions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Very Much !!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 03:40:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distributing-Hours-to-the-facilities-from-a-Facility/m-p/3669388#M142300</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-01-31T03:40:43Z</dc:date>
    </item>
  </channel>
</rss>

