<?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: Recreate an Excel table in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3941357#M153237</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81736" data-lia-user-login="aduguid" class="lia-mention lia-mention-user"&gt;aduguid&lt;/a&gt;&amp;nbsp;thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 03:32:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-23T03:32:58Z</dc:date>
    <item>
      <title>Recreate an Excel table in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3940758#M153215</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Hello community.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Please help me recreate the Excel table in Power BI.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Expected result:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;A href="https://1drv.ms/u/s!AmapBxxF0zFqu45Pczhc3kyU8oWtxQ?e=lBBH8z" target="_self"&gt;Link&lt;/A&gt; to sample file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 20:05:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3940758#M153215</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-22T20:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Recreate an Excel table in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3940944#M153224</link>
      <description>&lt;P&gt;First I would create a calculated column in "fct_test_results".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
RANKX(
    FILTER(
        fct_test_results,
        fct_test_results[Course] = EARLIER(fct_test_results[Course])
    )
    , fct_test_results[Pace],
    , ASC
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can create a DAX query for the results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fct_test_results_pivot = 

VAR _result = 
UNION(
	SELECTCOLUMNS(fct_test_results
	, "Course"		    , fct_test_results[Course]
    , "Rank"		    , fct_test_results[Rank]
	, "Column Value"	, fct_test_results[Pace]
	, "Column Name"	    , "Pace")
,
	SELECTCOLUMNS(fct_test_results
	, "Course"		    , fct_test_results[Course]
    , "Rank"		    , fct_test_results[Rank]
	, "Column Value"	, FORMAT(fct_test_results[Pace Test Result], "0%")
	, "Column Name"	    , "Result")
, 
	SELECTCOLUMNS(fct_test_results
	, "Course"		    , fct_test_results[Course]
    , "Rank"		    , fct_test_results[Rank]
	, "Column Value"	, FORMAT(fct_test_results[Pace Test Date], "MM/dd/yyyy")
	, "Column Name"	    , "Date")
)

RETURN
_result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want a different sort, you can create an additional DAX query and then relate it to the pivot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Metric List = 
VAR _results = 
DATATABLE (
      "Column Name",   STRING
	, "Column Order",  INTEGER
	,
    {
          {"Pace",      1}
		, {"Result",    2}
		, {"Date",	    3}
    }
)

RETURN
_results&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In this matrix I've used the [Course] from the "&lt;SPAN&gt;fct_test_results_pivot", [Column Name] from "&lt;/SPAN&gt;&lt;SPAN&gt;Metric List" (which has a column sort on [&lt;/SPAN&gt;&lt;SPAN&gt;Column Order]), [Rank] from&amp;nbsp;"&lt;SPAN&gt;fct_test_results_pivot" and the first [Column Value] from&amp;nbsp;"fct_test_results_pivot". If you have a unique key/id, you can include it in the pivot and relate it back to your original table so date filters would still work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 01:13:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3940944#M153224</guid>
      <dc:creator>aduguid</dc:creator>
      <dc:date>2024-05-23T01:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Recreate an Excel table in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3941357#M153237</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81736" data-lia-user-login="aduguid" class="lia-mention lia-mention-user"&gt;aduguid&lt;/a&gt;&amp;nbsp;thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 03:32:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3941357#M153237</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-23T03:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Recreate an Excel table in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3941363#M153238</link>
      <description>&lt;P&gt;no worries, anytime, happy to help&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 03:35:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recreate-an-Excel-table-in-Power-BI/m-p/3941363#M153238</guid>
      <dc:creator>aduguid</dc:creator>
      <dc:date>2024-05-23T03:35:29Z</dc:date>
    </item>
  </channel>
</rss>

