<?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: Error generating a table with a variable in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4023909#M158816</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="142448" data-lia-user-login="Syndicate_Admin" class="lia-mention lia-mention-user"&gt;Syndicate_Admin&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There seems to be a typo in your code. The WERE keyword should be VAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR SelectedGenre = SELECTEDVALUE('Musical genre'[nombre_genero])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="" style="background: white;"&gt;&lt;SPAN&gt;If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="" style="background: white;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2024 01:54:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-04T01:54:26Z</dc:date>
    <item>
      <title>Error generating a table with a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4023672#M158809</link>
      <description>&lt;P&gt;Good afternoon forum,&lt;BR /&gt;&lt;BR /&gt;I'm having trouble generating a pivot table. The main idea is that the table is generated from the value selected in the filter. Below I share the code made so far.&lt;BR /&gt;&lt;BR /&gt;Clarifications&lt;BR /&gt;The selectedvalue function is not registering the selection correctly, what would be the reason? &lt;BR /&gt;On this particular page of the report I have a measure that also uses the selected value from the filter to perform calculations, it works well.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Most popular songs by genre =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WERE&lt;/SPAN&gt; &lt;SPAN&gt;SelectedGenre&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;'Musical genre'&lt;/SPAN&gt;&lt;SPAN&gt;[nombre_genero]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    &lt;/SPAN&gt;&lt;SPAN&gt;TOPN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;10&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;'AR - CAN - CAL - GEN - PAR - SE - STR'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;            &lt;/SPAN&gt;&lt;SPAN&gt;'AR - CAN - CAL - GEN - PAR - SE - STR'&lt;/SPAN&gt;&lt;SPAN&gt;[nombre_genero]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SelectedGenre&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;'AR - CAN - CAL - GEN - PAR - SE - STR'&lt;/SPAN&gt;&lt;SPAN&gt;[total_streams]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    &lt;/SPAN&gt;&lt;SPAN&gt;"Song Name"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'AR - CAN - CAL - GEN - PAR - SE - STR'&lt;/SPAN&gt;&lt;SPAN&gt;[nombre_cancion]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;    &lt;/SPAN&gt;&lt;SPAN&gt;"Streams"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'AR - CAN - CAL - GEN - PAR - SE - STR'&lt;/SPAN&gt;&lt;SPAN&gt;[total_streams]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Jul 2024 20:28:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4023672#M158809</guid>
      <dc:creator>Syndicate_Admin</dc:creator>
      <dc:date>2024-07-03T20:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error generating a table with a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4023909#M158816</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="142448" data-lia-user-login="Syndicate_Admin" class="lia-mention lia-mention-user"&gt;Syndicate_Admin&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There seems to be a typo in your code. The WERE keyword should be VAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR SelectedGenre = SELECTEDVALUE('Musical genre'[nombre_genero])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="" style="background: white;"&gt;&lt;SPAN&gt;If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="" style="background: white;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 01:54:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4023909#M158816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-04T01:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error generating a table with a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4028350#M159163</link>
      <description>&lt;P&gt;In the original code is the word VAR used as a keyword to identify the SelectedGenre variable. &lt;BR /&gt;Here is an example.&lt;BR /&gt;Here's what the code currently returns.&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lo que devuelve" style="width: 999px;"&gt;&lt;img /&gt;&lt;SPAN class="lia-inline-image-caption" onclick=""&gt;What it gives back&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Here's what you should return&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="921872040e819c7b1c66406ead702ff5.png" style="width: 264px;"&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2024 21:17:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-generating-a-table-with-a-variable/m-p/4028350#M159163</guid>
      <dc:creator>Jeremias_Mena08</dc:creator>
      <dc:date>2024-07-06T21:17:06Z</dc:date>
    </item>
  </channel>
</rss>

