<?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 Create a measure to compare two dates and return result in a number format in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3473692#M132671</link>
    <description>&lt;P&gt;Hi Community&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help creating a measure to compare two dates in an engagement table and return a number in the correct format.&amp;nbsp; The strange thing is I have created the measure for another table however when I imported it to a new dasboard the format came back as number(date) format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my measure formula which should calculate the number of working days between two dates in the table:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;WorkingDaysMtg = &lt;/SPAN&gt;&lt;SPAN&gt;NETWORKDAYS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'AllEngagements'&lt;/SPAN&gt;&lt;SPAN&gt;[Start Date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'AllMeetings'&lt;/SPAN&gt;&lt;SPAN&gt;[Meeting Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Which returns the result:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;32284&lt;/FONT&gt; ( I am expecting a single digit such as 0,1,2,3 or 4 etc)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I have tried to format the result via a number of different ways but nothing works.&amp;nbsp; I'm just getting back into PBI after a some time away so i am a little bit rusty.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Any help much appreciated!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Elisa&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 12 Oct 2023 14:19:54 GMT</pubDate>
    <dc:creator>Elisa112</dc:creator>
    <dc:date>2023-10-12T14:19:54Z</dc:date>
    <item>
      <title>Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3473692#M132671</link>
      <description>&lt;P&gt;Hi Community&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help creating a measure to compare two dates in an engagement table and return a number in the correct format.&amp;nbsp; The strange thing is I have created the measure for another table however when I imported it to a new dasboard the format came back as number(date) format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my measure formula which should calculate the number of working days between two dates in the table:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;WorkingDaysMtg = &lt;/SPAN&gt;&lt;SPAN&gt;NETWORKDAYS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'AllEngagements'&lt;/SPAN&gt;&lt;SPAN&gt;[Start Date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'AllMeetings'&lt;/SPAN&gt;&lt;SPAN&gt;[Meeting Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Which returns the result:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;32284&lt;/FONT&gt; ( I am expecting a single digit such as 0,1,2,3 or 4 etc)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I have tried to format the result via a number of different ways but nothing works.&amp;nbsp; I'm just getting back into PBI after a some time away so i am a little bit rusty.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Any help much appreciated!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Elisa&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Oct 2023 14:19:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3473692#M132671</guid>
      <dc:creator>Elisa112</dc:creator>
      <dc:date>2023-10-12T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3473797#M132676</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="630267" data-lia-user-login="Elisa112" class="lia-mention lia-mention-user"&gt;Elisa112&lt;/a&gt;&amp;nbsp;you can modify your measure or custom column like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WorkingDaysMtgFormatted =&lt;BR /&gt;VAR WorkingDays = NETWORKDAYS(SELECTEDVALUE('AllEngagements'[Start Date]), SELECTEDVALUE('AllMeetings'[Meeting Date]))&lt;BR /&gt;RETURN&lt;BR /&gt;IF(WorkingDays &amp;lt; 5, WorkingDays, 4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this works&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 15:12:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3473797#M132676</guid>
      <dc:creator>DallasBaba</dc:creator>
      <dc:date>2023-10-12T15:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3478810#M132959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="446607" data-lia-user-login="DallasBaba" class="lia-mention lia-mention-user"&gt;DallasBaba&lt;/a&gt;&lt;/P&gt;&lt;P&gt;thank you, this only brings back "4" for each result which is incorrect, as I am looking to find the number of working days between two meeting dates for each engagement. what i really need to format my original measure.&amp;nbsp; It is currently returning a date value in a numerical format e.g. 32280&lt;/P&gt;&lt;P&gt;and I am looking for the number (1,2,3,4...10 etc).&lt;/P&gt;&lt;P&gt;Any assistance welcome&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:23:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3478810#M132959</guid>
      <dc:creator>Elisa112</dc:creator>
      <dc:date>2023-10-16T12:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3479500#M132992</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="630267" data-lia-user-login="Elisa112" class="lia-mention lia-mention-user"&gt;Elisa112&lt;/a&gt;&amp;nbsp;Can you try the following measure to return the number of working days:&lt;/P&gt;&lt;P&gt;WorkingDaysMtg =&amp;nbsp;NETWORKDAYS(‘AllEngagements’[Start Date], ‘AllMeetings’[Meeting Date])&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;==========OR&lt;/STRONG&gt;&lt;BR /&gt;WorkingDaysMtg =&lt;BR /&gt;VAR StartDate = SELECTEDVALUE('AllEngagements'[Start Date])&lt;BR /&gt;VAR MeetingDate = SELECTEDVALUE('AllMeetings'[Meeting Date])&lt;BR /&gt;VAR WorkingDays = NETWORKDAYS(StartDate, MeetingDate)&lt;BR /&gt;RETURN&lt;BR /&gt;WorkingDays&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should return the correct working days for each engagement and meeting date pair. You can also format the measure as a whole number in the Modeling tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this works.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 18:27:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3479500#M132992</guid>
      <dc:creator>DallasBaba</dc:creator>
      <dc:date>2023-10-16T18:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3482794#M133203</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="446607" data-lia-user-login="DallasBaba" class="lia-mention lia-mention-user"&gt;DallasBaba&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks so much for you help, I have now managed to pull through the correct data type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 08:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3482794#M133203</guid>
      <dc:creator>Elisa112</dc:creator>
      <dc:date>2023-10-18T08:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3483831#M133259</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="630267" data-lia-user-login="Elisa112" class="lia-mention lia-mention-user"&gt;Elisa112&lt;/a&gt;&amp;nbsp;Thanks for let me you you got the problem slove&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please mark my post as a solution,&amp;nbsp;I answer your question!&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 16:30:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3483831#M133259</guid>
      <dc:creator>DallasBaba</dc:creator>
      <dc:date>2023-10-18T16:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure to compare two dates and return result in a number format</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3584382#M138279</link>
      <description>&lt;P&gt;Hi again&lt;/P&gt;&lt;P&gt;Unfortnately I had to resolve another error and your solution did not work after that. I will try to repost the question.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 16:42:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-to-compare-two-dates-and-return-result-in-a/m-p/3584382#M138279</guid>
      <dc:creator>Elisa112</dc:creator>
      <dc:date>2023-12-14T16:42:24Z</dc:date>
    </item>
  </channel>
</rss>

