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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ak77
Helper V
Helper V

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
Helper V
Helper V

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors