Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ak77
Post Patron
Post Patron

Add column and rows to source table

Hi All,

i have the below Source table. i need to add 2 rows for each row in the output table with 2 extra columns as below

Source table

portfolio_codeclass_scheme_codeclass_scheme_node_nameclass_scheme_node_name_benchmarkclass_scheme_node_codedate_fromdate_tocontribution_basesequencereturn_portfolio_baselog_portfolio_baselog_benchmark_baselog_contribution_baseExcess_ReturnExcessReturnsHeaderclient_nameclient_typePortfolio_Node_Name_OverrideBenchmark_Node_Name_Override
PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/01/202301/01/20230.000.002.001.000.00001002000100.00Excess ReturnsClientPReal Estate 
PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/02/202301/02/20230.000.002.001.000.00001021000150.00Excess ReturnsClientPReal Estate 
PORTPORTCSEQEQ BenchmarkCDNEQ01/02/202301/02/20230.000.005.001.000012050200.00Excess ReturnsClientP  

 

 

New Column: Asset will have data from class_scheme_node_name,class_scheme_node_name_benchmark and ExcessReturnsHeader columns

New Column: Returns will have data from log_portfolio_base,log_benchmark_base and Excess_Return columns

 

all the other columns will be repeated in the extra 2 rows added. 

 

Please help

 

output table

AssetReturnsportfolio_codeclass_scheme_codeclass_scheme_node_nameclass_scheme_node_name_benchmarkclass_scheme_node_codedate_fromdate_tocontribution_basesequencereturn_portfolio_baselog_portfolio_baselog_benchmark_baselog_contribution_baseExcess_ReturnExcessReturnsHeaderclient_nameclient_typePortfolio_Node_Name_OverrideBenchmark_Node_Name_Override
REAL ESTATE100PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/01/202301/01/20230.000.002.001.000.00001002000311.00Excess ReturnsClientPReal Estate 
REAL ESTATE Benchmark200PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/01/202301/01/20230.000.002.001.000.00001002000311.00Excess ReturnsClientPReal Estate 
Excess Returns311.00PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/01/202301/01/20230.000.002.001.000.00001002000311.00Excess ReturnsClientPReal Estate 
REAL ESTATE102PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/02/202301/02/20230.000.002.001.000.00001021000314.00Excess ReturnsClientPReal Estate 
REAL ESTATE Benchmark100PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/02/202301/02/20230.000.002.001.000.00001021000314.00Excess ReturnsClientPReal Estate 
Excess Returns314PORTPORTCSREAL ESTATEREAL ESTATE BenchmarkREALEST01/02/202301/02/20230.000.002.001.000.00001021000314.00Excess ReturnsClientPReal Estate 
EQ150PORTPORTCSEQEQ BenchmarkCDNEQ01/01/202301/01/20230.000.005.001.0000150250315.00Excess ReturnsClientP  
EQ Benchmark25PORTPORTCSEQEQ BenchmarkCDNEQ01/01/202301/01/20230.000.005.001.0000150250315.00Excess ReturnsClientP  
Excess Returns315PORTPORTCSEQEQ BenchmarkCDNEQ01/02/202301/02/20230.000.005.001.000012050315.00Excess ReturnsClientP  
2 REPLIES 2
ak77
Post Patron
Post Patron

foodd
Super User
Super User

Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.