<?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 Stacked Line Chart - not stacking up in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Stacked-Line-Chart-not-stacking-up/m-p/4109525#M54867</link>
    <description>&lt;P&gt;Hello, I am relatively experienced with power BI but have recently been tasked with creating a visual representation of a company's revenue over time, by entity. As you can see from the examples below, the comany has a lot of different entities - this is not the issue. I'm trying to make all of the lines in the chart stack up - the only problem is, some entities will have no recorded revenue at all in a given period (like the data set doesn't show zero revenue, it doesn't have a value at all in that period). Additionally, some entities will have a negative revenue in a given period. What I would like to see is that the stacked lines all stack up each period, but&amp;nbsp;&lt;STRONG&gt;I would like to see none of the lines cross each other&lt;/STRONG&gt;. That way it is super clear that in any given period, which entities have which amount of revenue. I know that using a stacked bar chart accomplishes this very easily, but was curious if there is a way to make it work for line charts.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have included two screenshots of the charts - after doing some searching online someone suggested to switch the x-axis type to categorical instead of continuous but they both showed the lines crossing each other.&lt;BR /&gt;&lt;BR /&gt;X-axis as continuous:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;x-axis as categorical:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2024 15:34:02 GMT</pubDate>
    <dc:creator>orensteinb</dc:creator>
    <dc:date>2024-08-20T15:34:02Z</dc:date>
    <item>
      <title>Stacked Line Chart - not stacking up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Stacked-Line-Chart-not-stacking-up/m-p/4109525#M54867</link>
      <description>&lt;P&gt;Hello, I am relatively experienced with power BI but have recently been tasked with creating a visual representation of a company's revenue over time, by entity. As you can see from the examples below, the comany has a lot of different entities - this is not the issue. I'm trying to make all of the lines in the chart stack up - the only problem is, some entities will have no recorded revenue at all in a given period (like the data set doesn't show zero revenue, it doesn't have a value at all in that period). Additionally, some entities will have a negative revenue in a given period. What I would like to see is that the stacked lines all stack up each period, but&amp;nbsp;&lt;STRONG&gt;I would like to see none of the lines cross each other&lt;/STRONG&gt;. That way it is super clear that in any given period, which entities have which amount of revenue. I know that using a stacked bar chart accomplishes this very easily, but was curious if there is a way to make it work for line charts.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have included two screenshots of the charts - after doing some searching online someone suggested to switch the x-axis type to categorical instead of continuous but they both showed the lines crossing each other.&lt;BR /&gt;&lt;BR /&gt;X-axis as continuous:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;x-axis as categorical:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 15:34:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Stacked-Line-Chart-not-stacking-up/m-p/4109525#M54867</guid>
      <dc:creator>orensteinb</dc:creator>
      <dc:date>2024-08-20T15:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Stacked Line Chart - not stacking up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Stacked-Line-Chart-not-stacking-up/m-p/4110523#M54881</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="794528" data-lia-user-login="orensteinb" class="lia-mention lia-mention-user"&gt;orensteinb&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Regarding the issue you raised, my solution is as follows:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;First I have created the following table and the column names and data are the data you have given:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, I need the value of column to stay above column2 and the two lines do not intersect:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;I've created a measure substitution visualization like this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = IF(SUM('Table'[Column])&amp;gt;=SUM('Table'[Column 2]),SUM('Table'[Column]),0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = IF(SUM('Table'[Column 2])&amp;lt;SUM('Table'[Column]),SUM('Table'[Column 2]),0)&lt;/LI-CODE&gt;
&lt;P style="margin: 0in;"&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;Then modify the filter:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;3.&lt;/SPAN&gt;&lt;SPAN&gt;Here's the original visualization:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;Here's a visualization that uses a me&lt;/SPAN&gt;&lt;SPAN&gt;asure&lt;/SPAN&gt;&lt;SPAN&gt; judgment:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;SPAN&gt;If your needs involve multiple judgments, you can also choose the switch() function, and here is the documentation:&lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/switch-function-dax" target="_blank"&gt;&lt;SPAN&gt;SWITCH function (DAX) - DAX | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Of course, you can also use PowerQuery to modify the data itself.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;BR /&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;SPAN&gt;helps&lt;/SPAN&gt;, then please consider Accept it &lt;SPAN&gt;as the solution &lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 06:23:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Stacked-Line-Chart-not-stacking-up/m-p/4110523#M54881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-21T06:23:35Z</dc:date>
    </item>
  </channel>
</rss>

