Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
PQ Gurus,
Apologies in advanced that I can't share sample pbix file as i don't know how to create a "table" in each row.
Hopefully my screenshot can show you and that you're able to understand what I desired to achieve.
This is the result of one of the applied steps (call it 'PromoteHeader').
As you can see, in the [Data] column (denotes by the top right of screenshot), I have Table "result" on each row (what is the correct terminology for this so that everyone understand? Table Row?). And when I click on each of that Table "result", I'd have a preview of the data.
What I'd like to ahieve at the end result is to get a distinct column/headers names as list for expansion later on.
In order to do that, the logic is:
Solved! Go to Solution.
This might work for you...
let
Source =
#table(
type table [Name=nullable text, Data = table],
{
{"File1", #table({"Column1", "Column2"},{{"R1C1", "R1C2"},{"R2C1", "R2C2"}})},
{"File2", #table({"Column1", "Column3"},{{"R1C1", "R1C2"},{"R2C1", "R2C2"}})},
{"File3", #table({"Column2", "Column4"},{{"R1C1", "R1C2"},{"R2C1", "R2C2"}})}
}
),
Add_Header_Names_List = Table.AddColumn(Source, "HeaderNames", each Table.ColumnNames([Data]), type list),
Get_Distinct_Header_Names = List.Distinct(List.Combine(Add_Header_Names_List[HeaderNames]))
in
Get_Distinct_Header_Names
Proud to be a Super User! | |
This might work for you...
let
Source =
#table(
type table [Name=nullable text, Data = table],
{
{"File1", #table({"Column1", "Column2"},{{"R1C1", "R1C2"},{"R2C1", "R2C2"}})},
{"File2", #table({"Column1", "Column3"},{{"R1C1", "R1C2"},{"R2C1", "R2C2"}})},
{"File3", #table({"Column2", "Column4"},{{"R1C1", "R1C2"},{"R2C1", "R2C2"}})}
}
),
Add_Header_Names_List = Table.AddColumn(Source, "HeaderNames", each Table.ColumnNames([Data]), type list),
Get_Distinct_Header_Names = List.Distinct(List.Combine(Add_Header_Names_List[HeaderNames]))
in
Get_Distinct_Header_Names
Proud to be a Super User! | |