<?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: Divide values from two tables, dynamic required in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-values-from-two-tables-dynamic-required/m-p/1695045#M34877</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try:&lt;/P&gt;&lt;P&gt;VAR BookingsCount = CALCULATE(&lt;SPAN&gt;COUNT(Bookings[DateOfBooking]),ALL(Bookings))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And then OCC% = DIVIDE([DesksCount],[BookingsCount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As you are trying to get the percentage so the denominator should not be affected by any filters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope this works for you&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 05:09:03 GMT</pubDate>
    <dc:creator>PC2790</dc:creator>
    <dc:date>2021-03-01T05:09:03Z</dc:date>
    <item>
      <title>Divide values from two tables, dynamic required</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-values-from-two-tables-dynamic-required/m-p/1695002#M34875</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I've got a desk booking app and I'm trying to create the occupancy percentage, I want to do this by counting the number of desks at each site, in the&amp;nbsp;Desks_MasterData table, then divide it by the number of bookings in the Bookings table for each site. Then I want the user to use the slicer filters to filter bookings for that day to get %.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I've got it to work but only on Static formuals so the filter doesn't chage.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;These are the formula's I'm currently working with but they return a 0 result when combined together. When I see the values seperatly they are correct.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR DesksCount = COUNTROWS(FILTER(Desks_MaterData,Desks_MaterData[D_SiteConcat]=Bookings[SiteConcat]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR BookingsCount = COUNT(Bookings[DateOfBooking])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Occ% = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE(COUNTROWS(FILTER(Desks_MaterData,Desks_MaterData[D_SiteConcat]=Bookings[SiteConcat])),COUNT(Bookings[DateOfBooking]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any pointers or assistance on where I'm going wrong would be apprecaited. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 04:17:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-values-from-two-tables-dynamic-required/m-p/1695002#M34875</guid>
      <dc:creator>muncs</dc:creator>
      <dc:date>2021-03-01T04:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Divide values from two tables, dynamic required</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-values-from-two-tables-dynamic-required/m-p/1695045#M34877</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try:&lt;/P&gt;&lt;P&gt;VAR BookingsCount = CALCULATE(&lt;SPAN&gt;COUNT(Bookings[DateOfBooking]),ALL(Bookings))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And then OCC% = DIVIDE([DesksCount],[BookingsCount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As you are trying to get the percentage so the denominator should not be affected by any filters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope this works for you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 05:09:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-values-from-two-tables-dynamic-required/m-p/1695045#M34877</guid>
      <dc:creator>PC2790</dc:creator>
      <dc:date>2021-03-01T05:09:03Z</dc:date>
    </item>
  </channel>
</rss>

