<?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: How can I change value after a date in Dax? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2765402#M85877</link>
    <description>&lt;P&gt;"A better solution would be to organize all buy and sell records into a fact table and create a relationship with the date column of the calendar table, so that the problem becomes much easier."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I did that. Much more comfortable. Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 20:58:21 GMT</pubDate>
    <dc:creator>cris1196</dc:creator>
    <dc:date>2022-09-13T20:58:21Z</dc:date>
    <item>
      <title>How can I change value after a date in Dax?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2753957#M85057</link>
      <description>&lt;P&gt;Hello. I am having problems, I have the following table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If ID=1, the user has a house. If ID=2, you have a car. Opposite case, has a plane. The "DATA" table can be filtered with dates thanks to a table called DATE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fred, after March 15, 2022, sold his house and bought a car, consequently, he would belong to ID=2. The result I want is the following:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't get those two values to change from house--&amp;gt;car&lt;/P&gt;&lt;P&gt;Just in case: this is what i was trying:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
var SelectType=value(selectedvalue('DATE'[NAME])
var is_house=SelectType=1
var is_car=SelectType=2
var is_plane=not(is_house || is_car)
//With that, I manage to select the 3 types of data that I need

var SelectNames=selectedvalue('DATA'[Name])
var StartDate=DATE(2022, 03, 15)
var SelectDay=selectedvalue('DATE'[Day])

//With this, the idea is to use it later to say "if the date is greater than StartDate, I want to [specify what I want] result"

return
if(is_house, "House",
if(is_car, if(Selectday&amp;gt;StartDate, if(SelectNames="Fred", "Car",
//IF it is car, then IF the date is after StartDate AND IF the name is Fred, then it is changed to "Car"
if(is_car, "Car",
if(is_plane, "Plane"
))))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until now, everything I found on the Internet was related to what they wanted to add between dates, I did not find something similar to my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea is welcome &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 22:40:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2753957#M85057</guid>
      <dc:creator>cris1196</dc:creator>
      <dc:date>2022-09-07T22:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change value after a date in Dax?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2754301#M85087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="419925" data-lia-user-login="cris1196" class="lia-mention lia-mention-user"&gt;cris1196&lt;/a&gt;&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;Is this the only table you have for original data? All sales purchase records need to be manually go through the parameters in Dax?&amp;nbsp;Creating measures like this can be very difficult to maintain in code later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A better solution would be to organize all buy and sell records into a fact table and create a relationship with the date column of the calendar table, so that the problem becomes much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to provide sample data&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 05:25:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2754301#M85087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-08T05:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change value after a date in Dax?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2765402#M85877</link>
      <description>&lt;P&gt;"A better solution would be to organize all buy and sell records into a fact table and create a relationship with the date column of the calendar table, so that the problem becomes much easier."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I did that. Much more comfortable. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 20:58:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-change-value-after-a-date-in-Dax/m-p/2765402#M85877</guid>
      <dc:creator>cris1196</dc:creator>
      <dc:date>2022-09-13T20:58:21Z</dc:date>
    </item>
  </channel>
</rss>

