<?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 why can't I use string in IF statement? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836125#M149986</link>
    <description>&lt;P&gt;I have the following measure&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;LastReviewDate =&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;isblank&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FactPerformanceRating&lt;/SPAN&gt;&lt;SPAN&gt;[ReviewDate]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"No&lt;/SPAN&gt;&lt;SPAN&gt; Review Yet"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FactPerformanceRating&lt;/SPAN&gt;&lt;SPAN&gt;[ReviewDate]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;ReviewDate is all date format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When use this DAX, the card vis just show up as #,0.00, and it is not possible to format this measure as date.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;how can I change my DAX so that I can use string text inside the IF statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;source, from DataCamp course case study: HR analystics in Power BI &amp;gt; 9.2 Analysing demographics&lt;/P&gt;</description>
    <pubDate>Sun, 14 Apr 2024 11:39:10 GMT</pubDate>
    <dc:creator>BenBlackswan</dc:creator>
    <dc:date>2024-04-14T11:39:10Z</dc:date>
    <item>
      <title>why can't I use string in IF statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836125#M149986</link>
      <description>&lt;P&gt;I have the following measure&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;LastReviewDate =&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;isblank&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FactPerformanceRating&lt;/SPAN&gt;&lt;SPAN&gt;[ReviewDate]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"No&lt;/SPAN&gt;&lt;SPAN&gt; Review Yet"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FactPerformanceRating&lt;/SPAN&gt;&lt;SPAN&gt;[ReviewDate]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;ReviewDate is all date format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When use this DAX, the card vis just show up as #,0.00, and it is not possible to format this measure as date.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;how can I change my DAX so that I can use string text inside the IF statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;source, from DataCamp course case study: HR analystics in Power BI &amp;gt; 9.2 Analysing demographics&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 11:39:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836125#M149986</guid>
      <dc:creator>BenBlackswan</dc:creator>
      <dc:date>2024-04-14T11:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: why can't I use string in IF statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836162#M149987</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="524411" data-lia-user-login="BenBlackswan" class="lia-mention lia-mention-user"&gt;BenBlackswan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think card visual only takes the output of the same data type.&amp;nbsp; So for example, in your original formula, the data type can be either date format or string format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you tweak your formula like below, it will produce your required output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I also attach the pbix file for your reference.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 10:58:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836162#M149987</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2024-04-14T10:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: why can't I use string in IF statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836177#M149988</link>
      <description>&lt;P&gt;oh yes you are night.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The instruction did ask us to format it, but not in the code, but in the ribbon.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 11:38:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/why-can-t-I-use-string-in-IF-statement/m-p/3836177#M149988</guid>
      <dc:creator>BenBlackswan</dc:creator>
      <dc:date>2024-04-14T11:38:06Z</dc:date>
    </item>
  </channel>
</rss>

