<?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: Bar Graph Showing Percent Change per Category vs. Last Time Period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590483#M74615</link>
    <description>&lt;P&gt;I see the confusion -- in that case it's different instances of production for the same item code -- so, it is the production of a different unit, but the same item/item name.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jun 2022 20:57:03 GMT</pubDate>
    <dc:creator>Aedranoth</dc:creator>
    <dc:date>2022-06-20T20:57:03Z</dc:date>
    <item>
      <title>Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2583878#M74239</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Making a report but having trouble getting my desired visualization demonstrating percent change per category. Report pulls items (with a category column) produced in a week period along with value added (yield). Ideally, I'd like to create a bar chart that shows percent change of value added this week vs. last week for each category -- formatted like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The weighted average for total items yield current week and last week are correct.&lt;/P&gt;&lt;P&gt;To calculate percent change in total yield from this week over last week, I use this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Percent Change Yield Alt = 
    DIVIDE(
        'Production 22'[Current Week Weighted Average Yield], 'Production 22'[Prior Week Weighted Avg Yield])
         - 1&lt;/LI-CODE&gt;&lt;P&gt;Using that measure I've been trying to create another that store the weight average for each category rather than as a whole (I'm sure this has something to do with row context but I'm relatively new to this so I'm not positive). I've attempted a few different variations of this trying with DISTINCT, CALCULATE, or anything else I can find--I get a similar result though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first I tried plugging in the measure "Percent Change Yield Alt" into the chart x-axis, which gives me this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;From what I can tell, when there are multiple instances of items belonging to the same product category, that category's percent change will default to 5.24 (or the percent change in yield for total week production).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Been trying some absolutely random stuff in order to try to get the correct numbers pertaining to each category. Here's one of my most recent efforts:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Average2Change = 
AVERAGEX(
    DISTINCT(SELECTCOLUMNS('Production 22', " &amp;lt;y-axis (categories)&amp;gt; ", 'Production 22'[Percent Change Yield Alt], "Percent Change Yield Alt", 'Production 22'[Percent Change Yield Alt])), 
    [Percent Change Yield Alt]
)&lt;/LI-CODE&gt;&lt;P&gt;This DAX results in the first bar graph from earlier in this post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 18:46:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2583878#M74239</guid>
      <dc:creator>Aedranoth</dc:creator>
      <dc:date>2022-06-16T18:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2587709#M74475</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. I cannot use screenshots of your source data.&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, 20 Jun 2022 01:13:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2587709#M74475</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-20T01:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2589982#M74581</link>
      <description>&lt;P&gt;Hey, thank you for responding--&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/e53t708cokb29rp/Sample%20BI%20Report%20Percent%20Change.pbix?dl=0" target="_self"&gt;Here is a link to the pbix file.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 14:51:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2589982#M74581</guid>
      <dc:creator>Aedranoth</dc:creator>
      <dc:date>2022-06-20T14:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2589986#M74583</link>
      <description>&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/etuea5caq97b8a3yqaea9/Sample-Weekly-Yields.xlsx?dl=0&amp;amp;rlkey=zag48a8etlsafuxrzpyixdm8j" target="_blank"&gt;https://www.dropbox.com/scl/fi/etuea5caq97b8a3yqaea9/Sample-Weekly-Yields.xlsx?dl=0&amp;amp;rlkey=zag48a8etlsafuxrzpyixdm8j&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample data as well, apologies&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 14:53:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2589986#M74583</guid>
      <dc:creator>Aedranoth</dc:creator>
      <dc:date>2022-06-20T14:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590463#M74612</link>
      <description>&lt;P&gt;Please explain the importance of the Yield column.&amp;nbsp; You have multiple different values for item1 /Cat 1/Week 1 - how to handle these? Quantity * Yield for each individual row? and then you want the weighted average of the yield over these rows?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 20:43:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590463#M74612</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-20T20:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590467#M74613</link>
      <description>&lt;P&gt;Different items can have different yield -- it is an indicator of how successful the production process was for each individual item. I'm using a weighted average based on the quantity produced to demonstrate yields per summarized item.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 20:40:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590467#M74613</guid>
      <dc:creator>Aedranoth</dc:creator>
      <dc:date>2022-06-20T20:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590475#M74614</link>
      <description>&lt;P&gt;I see different yields for the &lt;STRONG&gt;same&lt;/STRONG&gt; item - that's what got me confused.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 20:53:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590475#M74614</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-20T20:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590483#M74615</link>
      <description>&lt;P&gt;I see the confusion -- in that case it's different instances of production for the same item code -- so, it is the production of a different unit, but the same item/item name.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 20:57:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590483#M74615</guid>
      <dc:creator>Aedranoth</dc:creator>
      <dc:date>2022-06-20T20:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590495#M74616</link>
      <description>&lt;P&gt;Anyway, here is the weighted average for the current week (which must be week 2 in your example)&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;weighted Avg = divide(sumx('Production 22',[Quantity]*[Yield]),sumx('Production 22',[Quantity]),0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can compute the same for the prior week and then do the WoW calculation. Looks like you already did that. Do you still need my help with that?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 21:07:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590495#M74616</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-20T21:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590514#M74618</link>
      <description>&lt;P&gt;I simplified your file a little.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Prior Week Weighted Avg Yield = 
var PriorWeekVar = [Prior Week]
var PW = CALCULATETABLE('Production 22',REMOVEFILTERS('Production 22'[Week No]),'Production 22'[Week Start]=PriorWeekVar)
   return DIVIDE (
            SUMX ( PW, [Quantity] * [Yield]),
            SUMX ( PW, [Quantity] ),0
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see attached&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 21:22:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2590514#M74618</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-20T21:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Graph Showing Percent Change per Category vs. Last Time Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2592338#M74703</link>
      <description>&lt;P&gt;This works, thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 13:17:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Graph-Showing-Percent-Change-per-Category-vs-Last-Time/m-p/2592338#M74703</guid>
      <dc:creator>Aedranoth</dc:creator>
      <dc:date>2022-06-21T13:17:50Z</dc:date>
    </item>
  </channel>
</rss>

