<?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: Multiple fact tables - A table of multiple values was supplied where a single value was expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/738079#M2152</link>
    <description>&lt;P&gt;Is there anyone who can help me out with creating a measure that only&amp;nbsp;&lt;SPAN&gt;counts when&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;products are on the same location as mentioned in the example above?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2019 20:23:49 GMT</pubDate>
    <dc:creator>LydiaRademaker</dc:creator>
    <dc:date>2019-07-11T20:23:49Z</dc:date>
    <item>
      <title>Multiple fact tables - A table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/727629#M1601</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I’m trying to filter my results on being on the same location. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My data model exists of one fact table with my product details, where Location is one of the columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The product has similar/competing products which we want to compare with. The fact table with similar/competing products also has a column Location.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to being able to filter on all the products&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;being sold on the same location, with a&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;slicer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This slicer sets a parameter, which I use in a measure called same location. I choose a product, and I would like to know if the competing products are also sold at that location.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Only when the location of all the products that are similar to the selected product are the same, I would like to show them in a visual. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to get the filter right without getting the error ‘A table of multiple values was supplied where a single value was expected’? As the product is sold at different locations, as are the competing products, I never seem to be able to get a scalar value. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyone any idea how to filter on a column with multiple values, based on a filter on a different fact table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or is there an easier way to determine if the products are sold at the same location?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 21:55:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/727629#M1601</guid>
      <dc:creator>LydiaRademaker</dc:creator>
      <dc:date>2019-06-28T21:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple fact tables - A table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/728334#M1613</link>
      <description>&lt;P&gt;I was curious to know if your data model will be suitable for such a calculation. So I tried filling some dummy data and tried to calculate the figures. I am getting the results. The following are the sample data and the measures that I have written to calculate the results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1: ProductLink&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;CompetingProduct&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2: ProductDetails&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Label&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;01-07-2019&lt;/TD&gt;&lt;TD&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;01-07-2019&lt;/TD&gt;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;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;TD&gt;South Africa&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;01-07-2019&lt;/TD&gt;&lt;TD&gt;2090&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;125&lt;/TD&gt;&lt;TD&gt;South Africa&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;01-07-2019&lt;/TD&gt;&lt;TD&gt;1875&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 1:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ProductSalesSameLocation =
CALCULATE (
    SUMX ( ProductDetails, ProductDetails[Amount] ),
    ProductDetails[Location] IN VALUES ( CompetingProductDetails[Location] )
)&lt;/PRE&gt;&lt;P&gt;Measure 2:&lt;/P&gt;&lt;PRE&gt;CompetingProductSalesSameLocation =
CALCULATE (
    SUMX ( CompetingProductDetails, CompetingProductDetails[Amount] ),
    CompetingProductDetails[Location] IN VALUES ( ProductDetails[Location] )
)&lt;/PRE&gt;&lt;P&gt;Measure 3:&lt;/P&gt;&lt;PRE&gt;ProductSalesAllLocations =
SUMX ( ALLSELECTED ( ProductDetails ), ProductDetails[Amount] )&lt;/PRE&gt;&lt;P&gt;Measure 4:&lt;/P&gt;&lt;PRE&gt;CompetingProductSalesAllLocations =
SUMX (
    ALLSELECTED ( CompetingProductDetails ),
    CompetingProductDetails[Amount]
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this and let me know if you are not getting the correct results. We can finetune as necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You must use the "Product" field from the "ProductLink" table in your slicer for filtering the product. The measures are written on that assumption.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 09:23:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/728334#M1613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-01T09:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple fact tables - A table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/730808#M1759</link>
      <description>&lt;P&gt;Thank you so much Anonymous&lt;/LI-USER&gt;&amp;nbsp;for the example measures! This helps a lot. In this example I totally get the way to calculate the total amount by filtering on the locations. What I am looking for is somewhat more complicated, as I would like to summarize or count only when &lt;STRONG&gt;all&lt;/STRONG&gt; competing products are on the same location; in the example we would have Product A with competing products D and E for example. If D and E are both sold at the USA, as is Product A, then I want to sum the amounts; if only D is also in the USA and E is not, then I don't want to sum these amounts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's hard to filter on this when I am trying to apply this in at a visual that contains the data of the competing products, as I am looking at for example Product E and only want to show results of the locations where all competing products are sold.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 12:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/730808#M1759</guid>
      <dc:creator>LydiaRademaker</dc:creator>
      <dc:date>2019-07-03T12:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple fact tables - A table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/738079#M2152</link>
      <description>&lt;P&gt;Is there anyone who can help me out with creating a measure that only&amp;nbsp;&lt;SPAN&gt;counts when&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;products are on the same location as mentioned in the example above?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 20:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/738079#M2152</guid>
      <dc:creator>LydiaRademaker</dc:creator>
      <dc:date>2019-07-11T20:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple fact tables - A table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/738636#M2167</link>
      <description>&lt;P&gt;First of all, I would - in your place - read about a correct dimensional design. Using M2M in Power BI the way I can see in your picture might not be the best idea. Do you know exactly how this works?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before you start doing crazy things and before you're not able to figure out what your Dax formulas calculate, please watch this (if you have not yet):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=pvIVMEFQokE" target="_blank"&gt;https://www.youtube.com/watch?v=pvIVMEFQokE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 09:51:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-fact-tables-A-table-of-multiple-values-was-supplied/m-p/738636#M2167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-12T09:51:27Z</dc:date>
    </item>
  </channel>
</rss>

