<?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: PowerBI Dataset Query in Excel (Column rename) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-Dataset-Query-in-Excel-Column-rename/m-p/3634219#M140587</link>
    <description>&lt;P&gt;I believe SELECTEDCOLUMNS function can rename your columns. Give this a try...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEFINE&lt;BR /&gt;VAR __DS0Core =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'Append1',&lt;BR /&gt;[Description],&lt;BR /&gt;[Variant Code],&lt;BR /&gt;[Main Supplier],&lt;BR /&gt;[Supplier]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR __DS0PrimaryWindowed =&lt;BR /&gt;TOPN(&lt;BR /&gt;501,&lt;BR /&gt;__DS0Core,&lt;BR /&gt;[Variant Code],&lt;BR /&gt;0,&lt;BR /&gt;[Description],&lt;BR /&gt;1,&lt;BR /&gt;[Main Supplier],&lt;BR /&gt;1,&lt;BR /&gt;[Supplier],&lt;BR /&gt;1&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;SELECTCOLUMNS(&lt;BR /&gt;__DS0PrimaryWindowed,&lt;BR /&gt;"Description", [Description],&lt;BR /&gt;"Variant Code", [Variant Code],&lt;BR /&gt;"Main Supplier", [Main Supplier],&lt;BR /&gt;"Supplier", [Supplier]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;ORDER BY&lt;BR /&gt;[Variant Code] DESC,&lt;BR /&gt;[Description],&lt;BR /&gt;[Main Supplier],&lt;BR /&gt;[Supplier]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 20:24:43 GMT</pubDate>
    <dc:creator>amustafa</dc:creator>
    <dc:date>2024-01-11T20:24:43Z</dc:date>
    <item>
      <title>PowerBI Dataset Query in Excel (Column rename)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-Dataset-Query-in-Excel-Column-rename/m-p/3633112#M140524</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hoping somebody can help assist with the renaming of column headers when querying a PowerBI dataset in Excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can live query my required PowerBI dataset in Excel but the column headers are rendered as per the absolute column name (Table[ColumnName]).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My live query looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEFINE
	VAR __DS0Core = 
		SUMMARIZE(
			'Append1',
			[Description],
			[Variant Code],
			[Main Supplier],
			[Supplier]
		)

	VAR __DS0PrimaryWindowed = 
		TOPN(
			501,
			__DS0Core,
			[Variant Code],
			0,
			[Description],
			1,
			[Main Supplier],
			1,
			[Supplier],
			1
		)

EVALUATE
	__DS0PrimaryWindowed

ORDER BY
	[Variant Code] DESC,
	[Description],
	[Main Supplier],
	[Supplier]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then excel returns column header names:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to rename this column headers, in the DAX query, to "Description", "Variant Code", "Main Supplier" and "Supplier".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 10:30:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-Dataset-Query-in-Excel-Column-rename/m-p/3633112#M140524</guid>
      <dc:creator>nytram6</dc:creator>
      <dc:date>2024-01-11T10:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI Dataset Query in Excel (Column rename)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-Dataset-Query-in-Excel-Column-rename/m-p/3634219#M140587</link>
      <description>&lt;P&gt;I believe SELECTEDCOLUMNS function can rename your columns. Give this a try...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEFINE&lt;BR /&gt;VAR __DS0Core =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'Append1',&lt;BR /&gt;[Description],&lt;BR /&gt;[Variant Code],&lt;BR /&gt;[Main Supplier],&lt;BR /&gt;[Supplier]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR __DS0PrimaryWindowed =&lt;BR /&gt;TOPN(&lt;BR /&gt;501,&lt;BR /&gt;__DS0Core,&lt;BR /&gt;[Variant Code],&lt;BR /&gt;0,&lt;BR /&gt;[Description],&lt;BR /&gt;1,&lt;BR /&gt;[Main Supplier],&lt;BR /&gt;1,&lt;BR /&gt;[Supplier],&lt;BR /&gt;1&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;SELECTCOLUMNS(&lt;BR /&gt;__DS0PrimaryWindowed,&lt;BR /&gt;"Description", [Description],&lt;BR /&gt;"Variant Code", [Variant Code],&lt;BR /&gt;"Main Supplier", [Main Supplier],&lt;BR /&gt;"Supplier", [Supplier]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;ORDER BY&lt;BR /&gt;[Variant Code] DESC,&lt;BR /&gt;[Description],&lt;BR /&gt;[Main Supplier],&lt;BR /&gt;[Supplier]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 20:24:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-Dataset-Query-in-Excel-Column-rename/m-p/3634219#M140587</guid>
      <dc:creator>amustafa</dc:creator>
      <dc:date>2024-01-11T20:24:43Z</dc:date>
    </item>
  </channel>
</rss>

