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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

it worked perfectly

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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