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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
william117
Frequent Visitor

Create a new column based on a group

I try to make a column where TotalData, contains several components, the idea is that it can identify what it belongs to by name and not by group_id, this is the example

 

 

PRODUCT_IDGROUP_IDNAMEIN OUT
1GROUP1DATA1 150
2GROUP1DATA2 12
3GROUP1DATA3 44
4GROUP1DATA4 75
5GROUP1DATATOTAL1281 
6GROUP2DATA5 400
7GROUP2DATA2 50
8GROUP2DATA6 200
9GROUP2DATATOTAL2650 

 

the result i try to do

PRODUCT_IDGROUP_IDNAMEIN OUTnew column
1GROUP1DATA1 150DATATOTAL1
2GROUP1DATA2 12DATATOTAL1
3GROUP1DATA3 44DATATOTAL1
4GROUP1DATA4 75DATATOTAL1
5GROUP1DATATOTAL1281 DATATOTAL1
6GROUP2DATA5 400DATATOTAL2
7GROUP2DATA2 50DATATOTAL2
8GROUP2DATA6 200DATATOTAL2
9GROUP2DATATOTAL2650 DATATOTAL2

 

I hope someone can solve my question, thanks for your time

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@william117 , Try a new column like]new column =
maxx(filter(Table, [GROUP_ID] =earlier([GROUP_ID]) && not(isblank([IN]))), [NAME])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@william117 , Try a new column like]new column =
maxx(filter(Table, [GROUP_ID] =earlier([GROUP_ID]) && not(isblank([IN]))), [NAME])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

it worked perfectly

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!