<?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: Expressions that yield variant data-type cannot be used to define calculated columns. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2256219#M54458</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="344845" data-lia-user-login="Fahad5" class="lia-mention lia-mention-user"&gt;Fahad5&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If these also don't help, please share more detailed information to help us clarify your scenario to test.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Dec 2021 02:49:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-27T02:49:07Z</dc:date>
    <item>
      <title>Expressions that yield variant data-type cannot be used to define calculated columns.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2245560#M53894</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help below function is getting error,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Partition-1 = IF(ISBLANK(TOKENFLEX_COUNT[Partition_1]),FORMAT(TODAY()-1,"yyyymmdd"),TOKENFLEX_COUNT[Partition_1])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 18 Dec 2021 02:16:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2245560#M53894</guid>
      <dc:creator>Fahad5</dc:creator>
      <dc:date>2021-12-18T02:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions that yield variant data-type cannot be used to define calculated columns.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2245584#M53896</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="344845" data-lia-user-login="Fahad5" class="lia-mention lia-mention-user"&gt;Fahad5&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Partition-1 =
IF(
    ISBLANK( [Partition_1] ),
    FORMAT( TODAY() - 1, "yyyymmdd" ),
    [Partition_1]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 03:47:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2245584#M53896</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-12-18T03:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions that yield variant data-type cannot be used to define calculated columns.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2245806#M53910</link>
      <description>&lt;P&gt;You'll get this error if the result-if-true and the result-if-false arguments of IF return different data types, for example, text when true and a number when false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to return text in the case of a blank, then you need to also return text when it's not blank too. You could use FORMAT there as well. For example,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Partition-1 =
VAR Partition = TOKENFLEX_COUNT[Partition_1]
RETURN
    IF (
        ISBLANK ( Partition ),
        FORMAT ( TODAY () - 1, "yyyymmdd" ),
        FORMAT ( Partition, "Standard" )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 18 Dec 2021 20:24:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2245806#M53910</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-12-18T20:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions that yield variant data-type cannot be used to define calculated columns.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2256219#M54458</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="344845" data-lia-user-login="Fahad5" class="lia-mention lia-mention-user"&gt;Fahad5&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If these also don't help, please share more detailed information to help us clarify your scenario to test.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 02:49:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expressions-that-yield-variant-data-type-cannot-be-used-to/m-p/2256219#M54458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-27T02:49:07Z</dc:date>
    </item>
  </channel>
</rss>

