<?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 formatting error - VALUE or FORMAT function recommended in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4735973#M181395</link>
    <description>&lt;P&gt;I need help either effectively applying the FORMAT or VALUE commands vs something else if I have misunderstood the formatting error I have recieved on my DAX code (copied below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error recieved =&amp;nbsp;&lt;/P&gt;&lt;P&gt;"DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The formula excutes successfully if I remove the "DOP &amp;lt; 42" component of the Return, yet this column of the table is formatted as a whole number, as is the "Reporting Year" - is it because I am asking if AED_RY and S_RY (whole number values derived from a date) are sourced from a Date column?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S_RY = a whole number reporting year extracted from a date column&lt;/P&gt;&lt;P&gt;AED_ RY =&amp;nbsp;a whole number reporting year extracted from a date column&lt;/P&gt;&lt;P&gt;DOP = a whole number unrelated to a date and when removed from the IF enables the IF to work - i believe this is therefore the source of the issue, but this is still a key component of the overall DAX code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help very greatly appreciated, thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jun 2025 12:47:41 GMT</pubDate>
    <dc:creator>SHRJ247</dc:creator>
    <dc:date>2025-06-18T12:47:41Z</dc:date>
    <item>
      <title>DAX formatting error - VALUE or FORMAT function recommended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4735973#M181395</link>
      <description>&lt;P&gt;I need help either effectively applying the FORMAT or VALUE commands vs something else if I have misunderstood the formatting error I have recieved on my DAX code (copied below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error recieved =&amp;nbsp;&lt;/P&gt;&lt;P&gt;"DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The formula excutes successfully if I remove the "DOP &amp;lt; 42" component of the Return, yet this column of the table is formatted as a whole number, as is the "Reporting Year" - is it because I am asking if AED_RY and S_RY (whole number values derived from a date) are sourced from a Date column?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S_RY = a whole number reporting year extracted from a date column&lt;/P&gt;&lt;P&gt;AED_ RY =&amp;nbsp;a whole number reporting year extracted from a date column&lt;/P&gt;&lt;P&gt;DOP = a whole number unrelated to a date and when removed from the IF enables the IF to work - i believe this is therefore the source of the issue, but this is still a key component of the overall DAX code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help very greatly appreciated, thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 12:47:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4735973#M181395</guid>
      <dc:creator>SHRJ247</dc:creator>
      <dc:date>2025-06-18T12:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formatting error - VALUE or FORMAT function recommended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4736008#M181396</link>
      <description>&lt;P&gt;The issue is the "&amp;amp;". A single ampersand like you have here is the string concatenation operator, you want "&amp;amp;&amp;amp;" which is a logical and.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 13:03:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4736008#M181396</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-06-18T13:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formatting error - VALUE or FORMAT function recommended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4736073#M181399</link>
      <description>&lt;P&gt;OMG Thank you so much, what a silly omission on my part, thank you for spotting&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 13:34:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4736073#M181399</guid>
      <dc:creator>SHRJ247</dc:creator>
      <dc:date>2025-06-18T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formatting error - VALUE or FORMAT function recommended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4736120#M181401</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1291700" data-lia-user-login="SHRJ247" class="lia-mention lia-mention-user"&gt;SHRJ247&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You're getting this error:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;“DAX comparison operations do not support comparing values of type Integer with values of type Text…”&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This occurs &lt;STRONG&gt;because of the &amp;amp;&amp;nbsp;operator&lt;/STRONG&gt;, which &lt;STRONG&gt;concatenates text&lt;/STRONG&gt;&amp;nbsp;it does &lt;STRONG&gt;not&lt;/STRONG&gt; function as a logical AND (&amp;amp;&amp;amp;).&amp;nbsp;DAX interprets S_RY &amp;amp; DOP &amp;lt; 42 as text concatenation (even though they’re numbers), and the resulting expression becomes semantically invalid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You likely meant to use the logical AND operator &amp;amp;&amp;amp;. So change this line:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;IF (AED_RY &amp;gt; S_RY &amp;amp; DOP &amp;lt; 42, S_RY, AED_RY)&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;To:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;IF (AED_RY &amp;gt; S_RY &amp;amp;&amp;amp; DOP &amp;lt; 42, S_RY, AED_RY)&lt;/PRE&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;H2&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Final Corrected Code&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H2&gt;&lt;PRE&gt;Draft =
VAR S_RY = LOOKUPVALUE('Aims Calender'[Reporting Year], 'Aims Calender'[Date], Aims[StartDate])
VAR AED_RY = RELATED('Aims Calender'[Reporting Year])
VAR DOP = Aims[Days On Programme]
RETURN
IF (AED_RY &amp;gt; S_RY &amp;amp;&amp;amp; DOP &amp;lt; 42, S_RY, AED_RY)&lt;/PRE&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;P&gt;&lt;STRONG&gt;If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/nasif-azam-9aa2331a0/" target="_blank" rel="noopener nofollow noreferrer"&gt;Nasif Azam&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 14:01:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4736120#M181401</guid>
      <dc:creator>Nasif_Azam</dc:creator>
      <dc:date>2025-06-18T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formatting error - VALUE or FORMAT function recommended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4737164#M181444</link>
      <description>&lt;P&gt;Thank you for your response and the time taken to differentiate the &amp;amp; and the &amp;amp;&amp;amp; meaning for me,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 08:28:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-formatting-error-VALUE-or-FORMAT-function-recommended/m-p/4737164#M181444</guid>
      <dc:creator>SHRJ247</dc:creator>
      <dc:date>2025-06-19T08:28:49Z</dc:date>
    </item>
  </channel>
</rss>

