<?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 Measure to check one column for a condition, then sum the rest of another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3047016#M104775</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to build a DAX equation to help show some data in a way the database is not set up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the context, I have 2 columns: 1)Old/New 2)Special/Range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is create a dax condition that shows me all the OLD then of the new how much is special/range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What my database currently looks like is something like this:&amp;nbsp;&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;Ideally what I want to do is create it so that it looks like the below to create&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;&lt;P&gt;To create the charts that look like this :&amp;nbsp;&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, 27 Jan 2023 10:49:17 GMT</pubDate>
    <dc:creator>redalert787</dc:creator>
    <dc:date>2023-01-27T10:49:17Z</dc:date>
    <item>
      <title>Measure to check one column for a condition, then sum the rest of another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3047016#M104775</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to build a DAX equation to help show some data in a way the database is not set up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the context, I have 2 columns: 1)Old/New 2)Special/Range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is create a dax condition that shows me all the OLD then of the new how much is special/range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What my database currently looks like is something like this:&amp;nbsp;&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;Ideally what I want to do is create it so that it looks like the below to create&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;&lt;P&gt;To create the charts that look like this :&amp;nbsp;&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, 27 Jan 2023 10:49:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3047016#M104775</guid>
      <dc:creator>redalert787</dc:creator>
      <dc:date>2023-01-27T10:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to check one column for a condition, then sum the rest of another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3047149#M104785</link>
      <description>&lt;P&gt;You could create a new conditional column in Power Query. If the old/new column equals old then use that column else use the special/range column. You can then include this column in your visuals with a measure summing sales.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 12:23:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3047149#M104785</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-01-27T12:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to check one column for a condition, then sum the rest of another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3049354#M104965</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="271242" data-lia-user-login="redalert787" class="lia-mention lia-mention-user"&gt;redalert787&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want to convert the table , for your need , it can be realized easiler in Power Query Editor.&lt;/P&gt;
&lt;P&gt;Here are the steps you can refer to :&lt;BR /&gt;(1)My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2)We can put this M code in the Advanced Editor" in Power Query Editor:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wys9JUdJRCi5ITc5MzAGyDA0MlGJ1YOJFiXnpqUiifqnlJIpimoxVPBYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"OLD/new" = _t, #"Special/range" = _t, Sales = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"OLD/new", type text}, {"Special/range", type text}, {"Sales", Int64.Type}}),
    #"New Table" = Table.RenameColumns(Table.RemoveColumns(Table.SelectRows(#"Changed Type", each ([#"OLD/new"] = "New")),{"OLD/new"}),{{"Special/range", "Column"}}),
    #"Old Table" = Table.RenameColumns(Table.RemoveColumns(Table.SelectRows(#"Changed Type", each ([#"OLD/new"] = "old")),{"Special/range"}),{{"OLD/new", "Column"}}),
    Custom1 = #"Old Table" &amp;amp; #"New Table"
in
    Custom1&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(3)Then we can get the table you need:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(4)Then we can apply the data to Desktop, and we put the fields on the visual and we can meet your need:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 03:34:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-check-one-column-for-a-condition-then-sum-the-rest-of/m-p/3049354#M104965</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-01-30T03:34:47Z</dc:date>
    </item>
  </channel>
</rss>

