<?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: Creating a new column based on date differences and matching values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3252279#M120033</link>
    <description>&lt;LI-CODE lang="markup"&gt;Sure, I can help you with that. Here's the DAX logic to create the new column 'intransit'[exception_date]:

```
intransit[exception_date] =
IF(
    ISBLANK(intransit[ETA CHN]) || intransit[ETA CHN] &amp;lt;&amp;gt; GRN[Receive Date PPC],
    GRN[Receive Date PPC],
    BLANK()
)
```

This formula checks if the date in each row of 'intransit'[ETA CHN] is missing or different from the corresponding row in 'GRN'[Receive PPC]. If it is, then it enters that date into the 'intransit'[exception_date] column. Otherwise, it leaves the column blank.

To create a new column to view 'intransit'[Invoice] based on 'intransit'[exception_date], you can use the following formula:

```
intransit[Invoice Exception] =
IF(
    NOT(ISBLANK(intransit[exception_date])),
    intransit[Invoice],
    BLANK()
)
```

This formula checks if the 'intransit'[exception_date] column is not blank. If it is not, then it enters the corresponding 'intransit'[Invoice] value into the 'intransit'[Invoice Exception] column. Otherwise, it leaves the column blank.

I hope this helps! Let me know if you have any further questions.&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 25 May 2023 03:48:58 GMT</pubDate>
    <dc:creator>Mrxiang</dc:creator>
    <dc:date>2023-05-25T03:48:58Z</dc:date>
    <item>
      <title>Creating a new column based on date differences and matching values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3252275#M120031</link>
      <description>&lt;P&gt;I'm having difficulty creating a DAX logic to create a new column 'intransit'[exception_date], where the values are derived from the difference between 'intransit'[ETA CHN] and 'GRN'[Receive Date PPC]. They are connected through the [Invoice (PIB)] column. If the date in each row of 'intransit'[ETA CHN] is missing or different from the corresponding row in 'GRN'[Receive PPC], then automatically that date should be entered into the 'intransit'[exception_date] column. I have tried using the EXCEPT function, but it resulted in an error. Additionally, I want to create a new column to view 'intransit'[Invoice] based on 'intransit'[exception_date]. Can you please help me with this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 03:45:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3252275#M120031</guid>
      <dc:creator>mrfsca</dc:creator>
      <dc:date>2023-05-25T03:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new column based on date differences and matching values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3252279#M120033</link>
      <description>&lt;LI-CODE lang="markup"&gt;Sure, I can help you with that. Here's the DAX logic to create the new column 'intransit'[exception_date]:

```
intransit[exception_date] =
IF(
    ISBLANK(intransit[ETA CHN]) || intransit[ETA CHN] &amp;lt;&amp;gt; GRN[Receive Date PPC],
    GRN[Receive Date PPC],
    BLANK()
)
```

This formula checks if the date in each row of 'intransit'[ETA CHN] is missing or different from the corresponding row in 'GRN'[Receive PPC]. If it is, then it enters that date into the 'intransit'[exception_date] column. Otherwise, it leaves the column blank.

To create a new column to view 'intransit'[Invoice] based on 'intransit'[exception_date], you can use the following formula:

```
intransit[Invoice Exception] =
IF(
    NOT(ISBLANK(intransit[exception_date])),
    intransit[Invoice],
    BLANK()
)
```

This formula checks if the 'intransit'[exception_date] column is not blank. If it is not, then it enters the corresponding 'intransit'[Invoice] value into the 'intransit'[Invoice Exception] column. Otherwise, it leaves the column blank.

I hope this helps! Let me know if you have any further questions.&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 May 2023 03:48:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3252279#M120033</guid>
      <dc:creator>Mrxiang</dc:creator>
      <dc:date>2023-05-25T03:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new column based on date differences and matching values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3253401#M120094</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hi, thank you for the solution you provided. When I tried it, the column GRN[Received Date(PPC)] is not being recognized. There is a red underline below its name with the message "cannot find name" and a warning message saying "A single value for column [Received Date(PPC)] in table 'GRN' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation." Do you know which aggregation can be used? I tried using the MAX value, but it doesn't seem to give me the desired result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 13:35:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-based-on-date-differences-and-matching/m-p/3253401#M120094</guid>
      <dc:creator>mrfsca</dc:creator>
      <dc:date>2023-05-25T13:35:00Z</dc:date>
    </item>
  </channel>
</rss>

