<?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: Support using 2 different dates to create the life time. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952759#M153463</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="736722" data-lia-user-login="FelippeAzevedo7" class="lia-mention lia-mention-user"&gt;FelippeAzevedo7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just change the TEXT in your formula to FORMAT, such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=IF(T5="Activation",INT(Q5-P5)&amp;amp;" days"&amp;amp;FORMAT(Q5-P5,"h"" hrs ""m"" mins """),INT(L5-K5)&amp;amp;" days"&amp;amp;FORMAT(L5-K5,"h"" hrs ""m"" mins """))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: Cell references such as T5 and Q5 need to be changed to the corresponding columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 May 2024 15:07:59 GMT</pubDate>
    <dc:creator>xifeng_L</dc:creator>
    <dc:date>2024-05-27T15:07:59Z</dc:date>
    <item>
      <title>Support using 2 different dates to create the life time.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952626#M153453</link>
      <description>&lt;P&gt;I would like to ask for help because I have a report that I am migrating from excel to power bi.&lt;BR /&gt;In it I have 2 different dates, one for main and one for activation.&lt;BR /&gt;For main I use 2 columns with start and end date, but when it comes to activation I use two other start and end dates.&lt;BR /&gt;I tried to reproduce my excel formula and it didn't work very well.&lt;BR /&gt;Are there any good tips?&lt;/P&gt;&lt;P&gt;Formula I use in excel: =IF(T5="Activation",INT(Q5-P5)&amp;amp;" days"&amp;amp;TEXT(Q5-P5,"h"" hrs ""m"" mins """),INT(L5-K5)&amp;amp;" days"&amp;amp;TEXT(L5-K5,"h"" hrs ""m"" mins """))&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 13:34:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952626#M153453</guid>
      <dc:creator>FelippeAzevedo7</dc:creator>
      <dc:date>2024-05-27T13:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Support using 2 different dates to create the life time.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952759#M153463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="736722" data-lia-user-login="FelippeAzevedo7" class="lia-mention lia-mention-user"&gt;FelippeAzevedo7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just change the TEXT in your formula to FORMAT, such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=IF(T5="Activation",INT(Q5-P5)&amp;amp;" days"&amp;amp;FORMAT(Q5-P5,"h"" hrs ""m"" mins """),INT(L5-K5)&amp;amp;" days"&amp;amp;FORMAT(L5-K5,"h"" hrs ""m"" mins """))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: Cell references such as T5 and Q5 need to be changed to the corresponding columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 15:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952759#M153463</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-27T15:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Support using 2 different dates to create the life time.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952952#M153478</link>
      <description>&lt;P&gt;Hello again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many tks for the information. It&amp;nbsp;worked perfectly!&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 17:56:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3952952#M153478</guid>
      <dc:creator>FelippeAzevedo7</dc:creator>
      <dc:date>2024-05-27T17:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Support using 2 different dates to create the life time.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3958994#M153643</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you check if the formula is correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LifeTime =&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;[Main or Activation]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Activation"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;INT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;[Activation End date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;[Activation Start date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;amp;&lt;/SPAN&gt;&lt;SPAN&gt;" days "&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&gt;&lt;SPAN&gt;[Activation End date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Sheet1&lt;/SPAN&g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lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The formula is only showing the days and no hrs or mins.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Could you help me to solve it?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Tks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 May 2024 20:54:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3958994#M153643</guid>
      <dc:creator>FelippeAzevedo7</dc:creator>
      <dc:date>2024-05-29T20:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Support using 2 different dates to create the life time.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3959254#M153648</link>
      <description>&lt;P&gt;If Table[Date] is a date containing a time, e.g. 2024-1-1 13:45, then Table[Date]. [Date] then always returns the date part, i.e. 2024-1-1, so that the hours and minutes in the result are 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm guessing it's due to this&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 01:46:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Support-using-2-different-dates-to-create-the-life-time/m-p/3959254#M153648</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-30T01:46:26Z</dc:date>
    </item>
  </channel>
</rss>

