<?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: In VAR, return should be a table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3311979#M123847</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578180" data-lia-user-login="Martin_D" class="lia-mention lia-mention-user"&gt;Martin_D&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added "Var List_" to my query but now it is showing "A table of multiple values was supplied where a single value was expected."&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__Test_Successful_Status_ = 
VAR Switchover = if(Query1[SwitchoverDate] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "SwitchoverDate_must be filled out, ", BLANK())
VAR Switchback = if(Query1[SwitchbackDate] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "SwitchbackDate_must be filled out, ", BLANK())
VAR StatusReason = if(Query1[StatusReason] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "StatusReason_must be filled out, ", BLANK())
VAR List_ = { Switchover , Switchback , StatusReason }
Return
List_&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;When trying to summarize the table, I've got this error message:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you advice?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;Brani&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2023 05:48:03 GMT</pubDate>
    <dc:creator>Brani</dc:creator>
    <dc:date>2023-07-03T05:48:03Z</dc:date>
    <item>
      <title>In VAR, return should be a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3309953#M123687</link>
      <description>&lt;P&gt;Hi all&lt;BR /&gt;&lt;BR /&gt;I by my self have a issue to explain what the issues is. At least I know what I need:&lt;BR /&gt;&lt;BR /&gt;I have a set of conditions in Variables:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;__Test_Successful_Status_ =&lt;BR /&gt;VAR Switchover = if(Query1[SwitchoverDate] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "SwitchoverDate_must be filled out, ", BLANK())&lt;BR /&gt;VAR Switchback = if(Query1[SwitchbackDate] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "SwitchbackDate_must be filled out, ", BLANK())&lt;BR /&gt;VAR StatusReason = if(Query1[StatusReason] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "StatusReason_must be filled out, ", BLANK())&lt;/P&gt;&lt;P&gt;Return&lt;BR /&gt;Switchover &amp;amp; Switchback &amp;amp; StatusReason&lt;BR /&gt;&lt;BR /&gt;When I add this to a column, I receive OR a single value OR a concatenate string of value. So far so good.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here I need your help: How to get a) a list of all the individual values and b) a count of all values.&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;Brani&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 10:22:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3309953#M123687</guid>
      <dc:creator>Brani</dc:creator>
      <dc:date>2023-06-30T10:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: In VAR, return should be a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3310506#M123744</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518891" data-lia-user-login="Brani" class="lia-mention lia-mention-user"&gt;Brani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A list of all the individual values (including blanks) is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR _list = { Switchover, Switchback, StatusReason }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A list of all the individual values except blank values is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR _listWithoutBlanks = FILTER ( _list, NOT ( ISBLANK ( [Value] ) ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;A&lt;SPAN&gt;&amp;nbsp;count of all values except blanks is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR _countNoBlanks = COUNTAX ( _list, [Value] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;A count of all values including blanks is (actually it's always 3 because you know you created a list from 3 elements):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR _countAll = COUNTROWS ( _list )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 15:31:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3310506#M123744</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-06-30T15:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: In VAR, return should be a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3311979#M123847</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578180" data-lia-user-login="Martin_D" class="lia-mention lia-mention-user"&gt;Martin_D&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added "Var List_" to my query but now it is showing "A table of multiple values was supplied where a single value was expected."&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__Test_Successful_Status_ = 
VAR Switchover = if(Query1[SwitchoverDate] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "SwitchoverDate_must be filled out, ", BLANK())
VAR Switchback = if(Query1[SwitchbackDate] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "SwitchbackDate_must be filled out, ", BLANK())
VAR StatusReason = if(Query1[StatusReason] = BLANK() &amp;amp;&amp;amp; Query1[Status] = "Successful", "StatusReason_must be filled out, ", BLANK())
VAR List_ = { Switchover , Switchback , StatusReason }
Return
List_&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;When trying to summarize the table, I've got this error message:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you advice?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;Brani&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 05:48:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3311979#M123847</guid>
      <dc:creator>Brani</dc:creator>
      <dc:date>2023-07-03T05:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: In VAR, return should be a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3312137#M123858</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518891" data-lia-user-login="Brani" class="lia-mention lia-mention-user"&gt;Brani&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;A measure cannot return a list or table, a measure can only return a single value. You could return e.g. the variables _countNoBlanks or _countAll. What you call a "list" is, maybe, not technically a list in terms of the DAX programming language, but a visual on a report table? Maybe a table visual?&lt;/P&gt;&lt;P&gt;For less reply ping-pong, would you mind providing the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The file&lt;/LI&gt;&lt;LI&gt;A description of the business requirements (not just the latest technical problem that you are facing)&lt;/LI&gt;&lt;LI&gt;A screenshot of what you currently see on your report page and what you don't like about it resp. what you are missing&lt;/LI&gt;&lt;LI&gt;A screenshot of a draft of what you finally want to see&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 07:12:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3312137#M123858</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-07-03T07:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: In VAR, return should be a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3313608#M123922</link>
      <description>&lt;P&gt;Hi all&lt;BR /&gt;&lt;BR /&gt;I am in need of your help. I've created a screenshot with the draft/outcome I would need:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 05:05:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-VAR-return-should-be-a-table/m-p/3313608#M123922</guid>
      <dc:creator>Brani</dc:creator>
      <dc:date>2023-07-04T05:05:42Z</dc:date>
    </item>
  </channel>
</rss>

