<?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 DAX formula to mark if the Product is less than Two-Thirds of it's shelf-life in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232845#M167402</link>
    <description>&lt;P&gt;Dear All ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need your help finding the proper way to apply this idea , I work in a pharmacutical manufacturer , every midecene we have obvisly have a Manufacturing date and Expiry date , I wanna know if this paticular product is less than two-thirds of it's shelf-life as on today or not .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example , Manufacturing date of product A is March 1st 2024 , Expiry date is March 1st 2026 ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;less than two thirds will be any date from October 1st 2024 onwards.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As on today this product is less than two-thirds .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to translate this idea into Power Bi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks alot &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2024 04:40:21 GMT</pubDate>
    <dc:creator>azoozaliraqe</dc:creator>
    <dc:date>2024-10-08T04:40:21Z</dc:date>
    <item>
      <title>DAX formula to mark if the Product is less than Two-Thirds of it's shelf-life</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232845#M167402</link>
      <description>&lt;P&gt;Dear All ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need your help finding the proper way to apply this idea , I work in a pharmacutical manufacturer , every midecene we have obvisly have a Manufacturing date and Expiry date , I wanna know if this paticular product is less than two-thirds of it's shelf-life as on today or not .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example , Manufacturing date of product A is March 1st 2024 , Expiry date is March 1st 2026 ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;less than two thirds will be any date from October 1st 2024 onwards.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As on today this product is less than two-thirds .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to translate this idea into Power Bi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks alot &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 04:40:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232845#M167402</guid>
      <dc:creator>azoozaliraqe</dc:creator>
      <dc:date>2024-10-08T04:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to mark if the Product is less than Two-Thirds of it's shelf-life</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232861#M167404</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="821676" data-lia-user-login="azoozaliraqe" class="lia-mention lia-mention-user"&gt;azoozaliraqe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming that your table structure is similar to to below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a calculated column&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;Is Product Less than Two-thirds =
VAR _shelflife = 'Table'[Expiry Date] - 'Table'[Manufacturing Date]
VAR _remaing_days =
    'Table'[Expiry Date] - TODAY ()
VAR _result =
    IF ( _shelflife * DIVIDE ( 2, 3 ) &amp;lt; _remaing_days, "Yes", "No" )
RETURN
    _result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Oct 2024 05:01:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232861#M167404</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2024-10-08T05:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to mark if the Product is less than Two-Thirds of it's shelf-life</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232889#M167405</link>
      <description>&lt;P&gt;Create a calculated column:&lt;/P&gt;&lt;PRE&gt;Is_Less_Than_Two_Thirds = &lt;BR /&gt;IF(TODAY() &amp;gt;= &lt;BR /&gt;[ManufacturingDate] + (DATEDIFF([ManufacturingDate], [ExpiryDate], DAY) * 2 / 3),&lt;BR /&gt;"Yes", &lt;BR /&gt;"No"&lt;BR /&gt;)&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Oct 2024 05:23:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4232889#M167405</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2024-10-08T05:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to mark if the Product is less than Two-Thirds of it's shelf-life</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4234654#M167474</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="821676" data-lia-user-login="azoozaliraqe" class="lia-mention lia-mention-user"&gt;azoozaliraqe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&amp;nbsp;nandukrishnavs&amp;nbsp;and Kedar_Pande&amp;nbsp;for your prompt reply.&amp;nbsp;Allow me to share some other ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition to calculating columns, you can also consider creating measures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Is it less than two thirds = 
VAR _Shelflife = DATEDIFF(SELECTEDVALUE('Table'[Manufacturing Date]), SELECTEDVALUE('Table'[Expiry Date]), DAY)
VAR _RemainingDate = DATEDIFF(TODAY(), SELECTEDVALUE('Table'[Expiry Date]), DAY)
RETURN
IF(
    DIVIDE(_RemainingDate, _Shelflife) &amp;gt;= DIVIDE(2, 3),
    "No less than two thirds",
    "Less than two thirds"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 06:22:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4234654#M167474</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-09T06:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula to mark if the Product is less than Two-Thirds of it's shelf-life</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4240523#M167867</link>
      <description>&lt;P&gt;Thanks alot dears , I have solved my problem thanks to your help.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 04:09:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formula-to-mark-if-the-Product-is-less-than-Two-Thirds-of-it/m-p/4240523#M167867</guid>
      <dc:creator>azoozaliraqe</dc:creator>
      <dc:date>2024-10-14T04:09:57Z</dc:date>
    </item>
  </channel>
</rss>

