<?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: Overwrite data from different fact table when available in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139066#M17023</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp;Thanks! Is a measure also possible if I just want to return the Value?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 14:14:52 GMT</pubDate>
    <dc:creator>richard-powerbi</dc:creator>
    <dc:date>2020-06-03T14:14:52Z</dc:date>
    <item>
      <title>Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1138825#M17015</link>
      <description>&lt;P&gt;How do I create a measure or a table with DAX to get calculated Table 3?&lt;/P&gt;&lt;P&gt;And how would I do it if I wanted just the measure for Value of Table 3?&lt;/P&gt;&lt;P&gt;Assuming I have common dimensions.&lt;/P&gt;&lt;P&gt;So when data exists in Table 2, it should overwrite data in Table 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;U&gt;&lt;STRONG&gt;Table 1&lt;/STRONG&gt;&lt;/U&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;U&gt;&lt;STRONG&gt;Table 2&lt;/STRONG&gt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TD&gt;C&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 03 Jun 2020 12:09:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1138825#M17015</guid>
      <dc:creator>richard-powerbi</dc:creator>
      <dc:date>2020-06-03T12:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139038#M17019</link>
      <description>&lt;P&gt;Please consider this solutioin and leave kudos.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Create a query with a merge left join and then a conditional column.&lt;/P&gt;&lt;P&gt;Note this is assuming that Table1 will always have a row for every ID.&lt;/P&gt;&lt;P&gt;If it hasn't then you&amp;nbsp; will need to tweak the query accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ulet&lt;BR /&gt;Source = Table.NestedJoin(Table1, {"Id"}, Table2, {"Id"}, "Table2", JoinKind.LeftOuter),&lt;BR /&gt;#"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Id", "Value"}, {"Table2.Id", "Table2.Value"}),&lt;BR /&gt;#"Renamed Columns" = Table.RenameColumns(#"Expanded Table2",{{"Value", "Table1.Value"}}),&lt;BR /&gt;#"Added Conditional Column" = Table.AddColumn(#"Renamed Columns", "Value", each if [Table2.Id] = null then [Table1.Value] else [Table2.Value]),&lt;BR /&gt;#"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column",{"Table1.Value", "Table2.Id", "Table2.Value"})&lt;BR /&gt;in&lt;BR /&gt;#"Removed Columns"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 13:57:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139038#M17019</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2020-06-03T13:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139041#M17020</link>
      <description>&lt;P&gt;I know this.... but why do I always get a PQ solution when I ask a DAX solution? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I want to keep them as separate&amp;nbsp;tables because they are different processes.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:06:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139041#M17020</guid>
      <dc:creator>richard-powerbi</dc:creator>
      <dc:date>2020-06-03T14:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139047#M17021</link>
      <description>&lt;P&gt;Sorry Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did wonder that, but it did look like a classic case where a M solutions was needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":zipper_mouth_face:"&gt;🤐&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:04:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139047#M17021</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2020-06-03T14:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139057#M17022</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="84144" data-lia-user-login="richard-powerbi" class="lia-mention lia-mention-user"&gt;richard-powerbi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calculated table in DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table3 =
ADDCOLUMNS (
    UNION ( DISTINCT ( Table1[Id] ), DISTINCT ( Table2[Id] ) ),
    "Value",
    VAR valT2_ =
        LOOKUPVALUE ( Table2[Value], Table2[Id], [Id] )
    RETURN
        IF (
            ISBLANK ( valT2 ),
            LOOKUPVALUE ( Table1[Value], Table1[Id], [Id] ),
            valT2_
        )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:10:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139057#M17022</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-06-03T14:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139066#M17023</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp;Thanks! Is a measure also possible if I just want to return the Value?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:14:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139066#M17023</guid>
      <dc:creator>richard-powerbi</dc:creator>
      <dc:date>2020-06-03T14:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139080#M17025</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="84144" data-lia-user-login="richard-powerbi" class="lia-mention lia-mention-user"&gt;richard-powerbi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A measure tobe used where and how? and to yield what result exactly? You talked about a calcualted table. Try to make it clearer with an example&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&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, 03 Jun 2020 14:18:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139080#M17025</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-06-03T14:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139095#M17026</link>
      <description>&lt;P&gt;Let's say I have a visual and I have Id from the dimension on the axis, and I want to show Value like it is in Table 3 in the Values of the visual. I think a measure would then be more suitable than a whole table?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:23:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139095#M17026</guid>
      <dc:creator>richard-powerbi</dc:creator>
      <dc:date>2020-06-03T14:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139096#M17027</link>
      <description>You get a PQ solution because DAX solutions will be slower if you start creating measures like the above. As for tables.... yes, you can create them in DAX but it's much better to prepare your data in advance, before it gets loaded into the model. To calculate moderate to large DAX tables it takes much more time than in M. And if I were you, I wouldn't even try to calculate tables of the same cardinality as the fact table through DAX.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 03 Jun 2020 14:24:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139096#M17027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-03T14:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite data from different fact table when available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139102#M17028</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="84144" data-lia-user-login="richard-powerbi" class="lia-mention lia-mention-user"&gt;richard-powerbi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming the field in the visual is the TableX[Id]:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR valT2_ =
    LOOKUPVALUE ( Table2[Value], Table2[Id], SELECTEDVALUE ( TableX[Id] ) )
RETURN
    IF (
        ISBLANK ( valT2 ),
        LOOKUPVALUE ( Table1[Value], Table1[Id], SELECTEDVALUE ( TableX[Id] ) ),
        valT2_
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:27:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overwrite-data-from-different-fact-table-when-available/m-p/1139102#M17028</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-06-03T14:27:27Z</dc:date>
    </item>
  </channel>
</rss>

