<?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 Bar chart with several fields in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2171214#M50419</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I´m have a database for a survey where i have one question per colmn. It is refreshed every two months and this part of the database looks like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;Customers,Question1,Quesiton2,Question3,Question4,Question5&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Customer1&lt;/FONT&gt;,3,3,3,3,3&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Customer2&lt;/FONT&gt;,4,4,3,4,3&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Customer3&lt;/FONT&gt;,5,3,4,2,4&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The answers are numbers from 1 to 5 and i want to make a bar/column chart where each column of the char represents the average answer for each question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In power bi, without editing the imported data, i have one field for each column:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to add &lt;FONT face="arial black,avant garde"&gt;each question as a separate&lt;/FONT&gt; column in the bar chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution i found is unpivoting the question columns but it´s a problem because i need to use the individual questions for other visuals and analysis. In reality i have around 70 questions (70 columns) and i need to do this same process with other groups of questions, unpivoting is not an option because if i do it for every group, the power query model becomes too big.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Nov 2021 17:34:11 GMT</pubDate>
    <dc:creator>AgustinBrocardo</dc:creator>
    <dc:date>2021-11-03T17:34:11Z</dc:date>
    <item>
      <title>Bar chart with several fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2171214#M50419</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I´m have a database for a survey where i have one question per colmn. It is refreshed every two months and this part of the database looks like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;Customers,Question1,Quesiton2,Question3,Question4,Question5&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Customer1&lt;/FONT&gt;,3,3,3,3,3&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Customer2&lt;/FONT&gt;,4,4,3,4,3&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Customer3&lt;/FONT&gt;,5,3,4,2,4&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The answers are numbers from 1 to 5 and i want to make a bar/column chart where each column of the char represents the average answer for each question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In power bi, without editing the imported data, i have one field for each column:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to add &lt;FONT face="arial black,avant garde"&gt;each question as a separate&lt;/FONT&gt; column in the bar chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution i found is unpivoting the question columns but it´s a problem because i need to use the individual questions for other visuals and analysis. In reality i have around 70 questions (70 columns) and i need to do this same process with other groups of questions, unpivoting is not an option because if i do it for every group, the power query model becomes too big.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:34:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2171214#M50419</guid>
      <dc:creator>AgustinBrocardo</dc:creator>
      <dc:date>2021-11-03T17:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with several fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2174175#M50549</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335286" data-lia-user-login="AgustinBrocardo" class="lia-mention lia-mention-user"&gt;AgustinBrocardo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may try this workaround. First, you need a column containing your questions. Then you can create a Measure like this:&lt;/P&gt;
&lt;P&gt;QuestionAvg =&lt;/P&gt;
&lt;P&gt;SWITCH(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECTEDVALUE(QuestionList[Question]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Question1",AVERAGE('Table'[Question1]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Question2",AVERAGE('Table'[Question2]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Question3",AVERAGE('Table'[Question3]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Question4",AVERAGE('Table'[Question4]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Question5",AVERAGE('Table'[Question5])&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result looks like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Also, attached the pbix file as reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly. If you still have problems on it, please feel free to let us know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 07:49:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2174175#M50549</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2021-11-05T07:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with several fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2177525#M50655</link>
      <description>&lt;P&gt;Thanks! it worked perfectly!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 08:55:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2177525#M50655</guid>
      <dc:creator>AgustinBrocardo</dc:creator>
      <dc:date>2021-11-08T08:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with several fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2179969#M50713</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335286" data-lia-user-login="AgustinBrocardo" class="lia-mention lia-mention-user"&gt;AgustinBrocardo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's great! Thanks for your feedback!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 08:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-with-several-fields/m-p/2179969#M50713</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2021-11-09T08:41:11Z</dc:date>
    </item>
  </channel>
</rss>

