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.
Hi,
Would like to check if it is possible to create new rows based on the value of existing rows? If yes, please advise how I can do this. Thank you!
Sample below:
Solved! Go to Solution.
Hello @lsihui_,
Can you please try this approach:
NewTable =
UNION (
'ExistingTable',
ADDCOLUMNS (
FILTER ( 'ExistingTable', 'ExistingTable'[Property] IN { "Apricot", "Blackcurrant" }),
"Property", IF ( 'ExistingTable'[Property] = "Apricot", "Combined A", "Combined B" ),
"Value",
VAR GroupA = CALCULATE( SUM('ExistingTable'[Value]), 'ExistingTable'[Group] = "A" )
VAR GroupB = CALCULATE( SUM('ExistingTable'[Value]), 'ExistingTable'[Group] = "B" )
RETURN
IF ( 'ExistingTable'[Property] = "Apricot", GroupA, GroupB ) - 'ExistingTable'[Value]
)
)
Your solution is so great Sahir_Maharaj
Hi, @lsihui_
In Power BI, we may not be able to insert rows on the go like Excel.
As provided by Super user, joining two tables together via the UNION function is how Power BI handles it.
If you want to customize the rows, you'll need to use a tool like Excel to insert them.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @lsihui_,
Can you please try this approach:
NewTable =
UNION (
'ExistingTable',
ADDCOLUMNS (
FILTER ( 'ExistingTable', 'ExistingTable'[Property] IN { "Apricot", "Blackcurrant" }),
"Property", IF ( 'ExistingTable'[Property] = "Apricot", "Combined A", "Combined B" ),
"Value",
VAR GroupA = CALCULATE( SUM('ExistingTable'[Value]), 'ExistingTable'[Group] = "A" )
VAR GroupB = CALCULATE( SUM('ExistingTable'[Value]), 'ExistingTable'[Group] = "B" )
RETURN
IF ( 'ExistingTable'[Property] = "Apricot", GroupA, GroupB ) - 'ExistingTable'[Value]
)
)