<?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: Textual Display of Days (DATEDIFF) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1053897#M14470</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226366" data-lia-user-login="Kogika" class="lia-mention lia-mention-user"&gt;Kogika&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;DateText = 
var _fulldays= 35
//replace 35 with your measure 
var _year= QUOTIENT(_fulldays,365)
var _month= QUOTIENT(MOD(_fulldays,365),30)
var _day= MOD(MOD(_fulldays,365),30)
var _yearText = IF(_year=1,"1 year",IF(_year&amp;gt;1,_year&amp;amp;" years",BLANK()))
var _monthText= IF(_month=1,"1 month",IF(_month&amp;gt;1,_month&amp;amp;" months",BLANK()))
var _dayText= IF(_day=1,"1 day",IF(_day&amp;gt;1,_day&amp;amp;" days",BLANK()))
var _finalText= _yearText&amp;amp;" "&amp;amp;_monthText&amp;amp;" "&amp;amp;_dayText
return _finalText&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may have to tweak the code a little bit.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2020 14:44:20 GMT</pubDate>
    <dc:creator>nandukrishnavs</dc:creator>
    <dc:date>2020-04-28T14:44:20Z</dc:date>
    <item>
      <title>Textual Display of Days (DATEDIFF)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1053811#M14464</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I`m using the DATEDIFF function and I`m getting the expected results in number of days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I`m not being able to do is to display the days in a more textual form. For example, If I have the number 398 days, I want to display " 1 year, 1 month and 3 days".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I would like to use plurals/singular on Years Months and Days everytime it is applicable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been struggling with that bu couldn't find any particular approach to make it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 14:09:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1053811#M14464</guid>
      <dc:creator>Kogika</dc:creator>
      <dc:date>2020-04-28T14:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Textual Display of Days (DATEDIFF)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1053897#M14470</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226366" data-lia-user-login="Kogika" class="lia-mention lia-mention-user"&gt;Kogika&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;DateText = 
var _fulldays= 35
//replace 35 with your measure 
var _year= QUOTIENT(_fulldays,365)
var _month= QUOTIENT(MOD(_fulldays,365),30)
var _day= MOD(MOD(_fulldays,365),30)
var _yearText = IF(_year=1,"1 year",IF(_year&amp;gt;1,_year&amp;amp;" years",BLANK()))
var _monthText= IF(_month=1,"1 month",IF(_month&amp;gt;1,_month&amp;amp;" months",BLANK()))
var _dayText= IF(_day=1,"1 day",IF(_day&amp;gt;1,_day&amp;amp;" days",BLANK()))
var _finalText= _yearText&amp;amp;" "&amp;amp;_monthText&amp;amp;" "&amp;amp;_dayText
return _finalText&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may have to tweak the code a little bit.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 14:44:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1053897#M14470</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-04-28T14:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Textual Display of Days (DATEDIFF)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1054572#M14503</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="32333" data-lia-user-login="nandukrishnavs" class="lia-mention lia-mention-user"&gt;nandukrishnavs&lt;/a&gt;&amp;nbsp;, it worked perfectly! Very nice approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 19:38:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Textual-Display-of-Days-DATEDIFF/m-p/1054572#M14503</guid>
      <dc:creator>Kogika</dc:creator>
      <dc:date>2020-04-28T19:38:14Z</dc:date>
    </item>
  </channel>
</rss>

