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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

it worked perfectly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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