<?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: Compare only matching producs and calculate subtotals/totals in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2548138#M72032</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the things I'm trying to measure are most definetely there, and it's basically a "standart" business world problem, I think you didn't quite understood the problem and&amp;nbsp; what I wanted to calculate. Neverthelles, I found a solution, and as a though, it was pretty simple to implement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 May 2022 15:36:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-30T15:36:17Z</dc:date>
    <item>
      <title>Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2485719#M68238</link>
      <description>&lt;P&gt;HI PBI Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following issue&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following raw data - every week I get new data from different websites (column Websites), with many different Brands (&amp;gt;100), different Segments (column Segment 2) and Products. I have prices and the volume is the same for every product, no matter which brand – e.g product 1 will have a volume of 47&amp;nbsp;948 for every brand etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to weight the price with the volume and then compare each product with weighted price of my house brand. Basically compare how much cheaper or more expensive the other brands are compared to my products on &lt;STRONG&gt;product, segment 2 and brand level&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that for some products only one of the two compared brands has a price.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to exclude the products without price with ISBLANK but it’s not working properly.&lt;/P&gt;&lt;P&gt;I found a way where I manually filter the table with “is not blank” but this trick doesn’t work on Totals and I can’t use it for line charts.&lt;/P&gt;&lt;P&gt;So how to compare only the product that have prices, so the subtotals and totals will be correct?&lt;/P&gt;&lt;P&gt;Here the screenshots for more details:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUMX Price*Volume = sumx('Table','Table'[Price]*'Table'[Volume])&lt;/P&gt;&lt;P&gt;Sumx House Brand = CALCULATE([SUMX Price*Volume],'Table'[Brand]="House Brand")&lt;/P&gt;&lt;P&gt;Index = DIVIDE([SUMX Price*Volume],[Sumx House Brand])&lt;/P&gt;&lt;P&gt;Index if blank = if(ISBLANK([SUMX Price*Volume]),BLANK(), DIVIDE([SUMX Price*Volume],[Sumx House Brand]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; BR&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 11:54:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2485719#M68238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-29T11:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2488674#M68423</link>
      <description>&lt;P&gt;Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 12:44:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2488674#M68423</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-02T12:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2522772#M70424</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the sample data -&amp;nbsp;&lt;A href="https://we.tl/t-hPwuemDKr8" target="_blank" rel="noopener noreferrer"&gt;https://we.tl/t-hPwuemDKr8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The expected outcome is seen in the screenshots.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks &amp;amp; BR&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 May 2022 09:00:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2522772#M70424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T09:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2524120#M70515</link>
      <description>&lt;P&gt;Thank you for providing the sample data. That helps a lot with proposing a potential solution.&lt;/P&gt;
&lt;P&gt;Something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 18:14:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2524120#M70515</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-18T18:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2528991#M70840</link>
      <description>&lt;P&gt;Hi Ibendlin,&lt;/P&gt;&lt;P&gt;unfortunately, no &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is again a screenshot with my expected outcome: I need a matrix, that compares all the brands with my house brand on product, product group and brand level - e.g how much cheaper or more expensive the other brands are. The problem is, that there are not always prices for all products&amp;nbsp; - from the screenshot - in Week 02.2022 under product group 1 I have 5 products in total , but for Brand 1 I have prices only for Product 2,3,5 but my house brand has prices for all the 5 products. I need the measure the calculate only the index base on those 3 matching products, that the brands have in common during this week. My measure is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Index if blank = &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[SUMX Price*Volume]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[SUMX Price*Volume]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Sumx House Brand]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but it doen't work, I need to manually select as a table filter that the&amp;nbsp;[SUMX Price*Volume] is not blank, than I see in the matrix the right result on product and product group level, but on brand level, it is still wrong - in green you see what the right index should be.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I also want the see the brand index in a line graph - I tried to add here again the manuall filter "&lt;SPAN&gt;[SUMX Price*Volume]" is not blank or "Index if blank" is not blank, but it seem that trick doesn`t work here - I still have the wrong brand indexes in the graph.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 09:50:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2528991#M70840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-20T09:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529637#M70884</link>
      <description>&lt;P&gt;Ich versteh's immer noch nicht.&amp;nbsp; Was muss hier anders sein?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 14:01:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529637#M70884</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-20T14:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529762#M70903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'll&amp;nbsp; continue in english, so the others will also understand &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You are calculating % of every brand from column total, right?&lt;/P&gt;&lt;P&gt;I don't need this - I need to compare every brand to my house brand and get an index - e.g Brand 1/House Brand, Brand 2/ House Brand, etc. that's why I use these measures -&amp;nbsp;&lt;SPAN&gt;Index if blank = if(ISBLANK([SUMX Price*Volume]),BLANK(), &lt;STRONG&gt;DIVIDE([SUMX Price*Volume],[Sumx House Brand]))&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;SUMX Price*Volume = sumx('Table','Table'[Price]*'Table'[Volume])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is it doesn't ignore the empty values - as described above - in week 02.2022 for brand 1 I have Products 2,3,5&amp;nbsp; and I want the index measure to compare these 3 products with the same 3 products of my house brand. BUT since my house brand has all 5 products, the measure compare the sumx of the 3 product of brand 1 to the sumx of all 5 products of my house brand and this makes the index wrong.&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here a more simplified example:&lt;/P&gt;&lt;P&gt;the numbers in red are wrong, because it's the total for all 5 product and I need the total from the 3 products, that both brands have.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and here how it shoud look like: you can clearly see the difference in the index.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 15:16:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529762#M70903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-20T15:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529779#M70905</link>
      <description>&lt;P&gt;Hello Ibedlin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I buiolt the same report with data sample. But I do not succeed to have the %RT PV on sub toatals and total.&lt;/P&gt;&lt;P&gt;How do you manage to get it ,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 14:55:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529779#M70905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-20T14:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529900#M70914</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a standard implicit measure format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 15:47:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2529900#M70914</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-20T15:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2530262#M70949</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;I want the index measure to compare these 3 products with the same 3 products of my house brand."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You are going deep (very deep) into the "black cat in a dark room"&amp;nbsp; territory.&amp;nbsp; You are trying to measure things that are not there. That always requires disconnected tables with crossjoins - in your case between Brand, Segment 2, and Product. It also means you have to completely redo your visual.&amp;nbsp; &amp;nbsp;It can be done, but has a high effort.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 19:50:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2530262#M70949</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-20T19:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare only matching producs and calculate subtotals/totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2548138#M72032</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the things I'm trying to measure are most definetely there, and it's basically a "standart" business world problem, I think you didn't quite understood the problem and&amp;nbsp; what I wanted to calculate. Neverthelles, I found a solution, and as a though, it was pretty simple to implement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 15:36:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-only-matching-producs-and-calculate-subtotals-totals/m-p/2548138#M72032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-30T15:36:17Z</dc:date>
    </item>
  </channel>
</rss>

