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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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