<?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: DAX Help - replace an aggregated value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4001541#M155946</link>
    <description>&lt;P&gt;Hi, thanks for you answer, unfortunately, though I still have to add the MAX() function around the fields (or else I get errors) and then that seems to lead me back to where I was before – same results at least. I'd been hoping there was a better alternative to MAX for text, or something like HASONEVALUE().&lt;BR /&gt;I really appreciate the suggestion, though.&lt;BR /&gt;Matt&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2024 08:51:06 GMT</pubDate>
    <dc:creator>Coriel-11</dc:creator>
    <dc:date>2024-06-20T08:51:06Z</dc:date>
    <item>
      <title>DAX Help - replace an aggregated value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4000280#M155821</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I have a table ("Interactions") that looks like this:&lt;/P&gt;&lt;P&gt;Date Team Interactions Source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;15/03/2024&lt;/TD&gt;&lt;TD&gt;Training&lt;/TD&gt;&lt;TD&gt;328&lt;/TD&gt;&lt;TD&gt;Emails&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/04/2024&lt;/TD&gt;&lt;TD&gt;Training&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Calls&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31/05/2024&lt;/TD&gt;&lt;TD&gt;Membership&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Emails&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31/05/2024&lt;/TD&gt;&lt;TD&gt;Membership&lt;/TD&gt;&lt;TD&gt;258&lt;/TD&gt;&lt;TD&gt;Calls&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's connected to my "Calendar" (i.e. Date) Table.&lt;/P&gt;&lt;P&gt;I have a visual (line graph) which has month along the x-axis and sums interactions on the Y axis with the Source in the Legend.&lt;/P&gt;&lt;P&gt;Unfortunately I need to replace the figure for Emails from Training during May 2024 with 4106.&lt;/P&gt;&lt;P&gt;I tried to do this with an IF statement but it doesn't aggregate properly, it replaces the point on the diagram that should be the 4106 + the value for Emails Membership for May, with just the 4106.&lt;/P&gt;&lt;PRE&gt;Measure = IF(
&amp;nbsp; &amp;nbsp; MAX(Interactions[Team]) = "Training" &amp;amp;&amp;amp;
&amp;nbsp; &amp;nbsp; MAX(Interactions[Source]) = "Emails" &amp;amp;&amp;amp;
&amp;nbsp; &amp;nbsp; YEAR(MAX('Calendar'[Date])) = 2024 &amp;amp;&amp;amp;
&amp;nbsp; &amp;nbsp; MONTH(MAX('Calendar'[Date])) = 5
&amp;nbsp; &amp;nbsp; ,
4160,
SUM(Interactions[Interactions])
)&lt;/PRE&gt;&lt;P&gt;I think that was because I used a MAX value in the filtering (so when faced with Training values combined with Membership, it just takes the MAX - i.e. Training), but I can't work out what I should use instead so there aren't the same problems with aggregating.&lt;/P&gt;&lt;P&gt;Tried a lot of other things as well, without success&lt;/P&gt;&lt;P&gt;Can anyone put me right on this?&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 14:01:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4000280#M155821</guid>
      <dc:creator>Coriel-11</dc:creator>
      <dc:date>2024-06-19T14:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Help - replace an aggregated value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4000471#M155822</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;You can consider the following to see if this will get&amp;nbsp; you your intended result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _Interactions = 
IF (
    AND ( Interactions[Team] = "Training", Interactions[Source] = "Emails" ),
    TRUE (),
    FALSE ()
)

VAR _Date = 
IF (
    AND ( YEAR ( 'Calendar'[Date] ) = 2024, MONTH ( 'Calendar'[Date] ) = 5 ),
    TRUE (),
    FALSE ()
)

RETURN
IF ( AND ( _Interactions, _Date ), 4160, SUM ( Interactions[Interactions] ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 16:12:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4000471#M155822</guid>
      <dc:creator>ExcelMonke</dc:creator>
      <dc:date>2024-06-19T16:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Help - replace an aggregated value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4001541#M155946</link>
      <description>&lt;P&gt;Hi, thanks for you answer, unfortunately, though I still have to add the MAX() function around the fields (or else I get errors) and then that seems to lead me back to where I was before – same results at least. I'd been hoping there was a better alternative to MAX for text, or something like HASONEVALUE().&lt;BR /&gt;I really appreciate the suggestion, though.&lt;BR /&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 08:51:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Help-replace-an-aggregated-value/m-p/4001541#M155946</guid>
      <dc:creator>Coriel-11</dc:creator>
      <dc:date>2024-06-20T08:51:06Z</dc:date>
    </item>
  </channel>
</rss>

