Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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]
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
57 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
66 | |
45 | |
44 | |
40 |