cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
kressb
Helper V
Helper V

Adding a Row to a Created Table?

Hello,

I created a Table in PowerBI Desktop:

kressb_0-1626203626346.png

Table =
Filter(
Summarize(ExistingTable, ExistingTable[UniqueID1], ExistingTable[UniqueID1], ExistingTable[Name], ExistingTable[Number1], ExistingTable[Number2], Rollforward[Number3], ExistingTable[Number4], ExistingTable[Number5],ExistingTable[Notes], ExistingTable[Site], "StartDate", Min(ExistingTable[Start Date])),
CONTAINSSTRING(ExistingTable[Notes],"Abc"))
 
Now I need to add a Row that's outside the "ExistingTable"
Is there a way to add code to do this?
1 ACCEPTED SOLUTION

Hi @kressb ,

 

you can append more rows/tables with UNION.

https://dax.guide/union/

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

7 REPLIES 7

Hi @kressb ,

 

you can append more rows/tables with UNION.

https://dax.guide/union/

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


@mwegener 

Yes, but I don't have any table to UNION them from.

IE the data exists only in my head and I want to enter it into the table

You could use the Enter data button to create a new table with the data in your head or else define it as a DATATABLE with DAX.

Hi @kressb ,

 

then you must create the table in the same structure with DATATABLE

https://docs.microsoft.com/en-us/dax/datatable-function

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


@AlexisOlson @mwegener 
Ok, so selected enter data, created another table with my manual data - used all the same columns in the exact same order and formated them all correctly.

went back to the original table I created. called that one var _Table1 and then set a Union:

Table =
var _Table1 = Filter(
Summarize(ExistingTable, ExistingTable[UniqueID1], ExistingTable[UniqueID1], ExistingTable[Name], ExistingTable[Number1], ExistingTable[Number2], Rollforward[Number3], ExistingTable[Number4], ExistingTable[Number5],ExistingTable[Notes], ExistingTable[Site], "StartDate", Min(ExistingTable[Start Date])),
CONTAINSSTRING(ExistingTable[Notes],"Abc"))
Return
Union (_Table1,SecondNewTable)
 
Columns between the 2 tables are not matching up.. why?

Update: read this thread: Union column order - Microsoft Power BI Community

Had to add a nested Summarize to the Second New Table to get it to work.. 

Seems like a lot more work than it should be...

Your second table needs to match the columns of the table you are unioning it with, not the original shape of the table you are summarizing. Having [UniqueID1] twice in your summary might make this problematic.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors