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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dax_rach
Frequent Visitor

Create calculated column assigning value from another colum|n to all rows from the same group.

Hi everyone!

 

I'm trying to come up with a solution for this issue. I need to create a calculated column [NEEDED_COL] that has a value which is in a different column [PERC_1]. 

 

In the example, I am trying to achieve this result. There are over 50.000 different values on [GROUP] and each one has a row [DOMAIN| = "YOU" with its corresponding [PERC_1]value. The calculated column [NEEDED_COL] needs for each row of each group to have that [PERC_1] that belongs to the row = "YOU"

 

GROUPDOMAINPERC_1PERC_2NEEDED_COL ( PERC_1 = "YOU"RESULT_COL ( PERC_2 x NEEDED_COL )
Group_1website_150%

13%

35%13% x 35%
Group_1

test_web

20%3%35%3 x 35%
Group_1YOU35%6%35%6% x 35%
Group_20website_thing12%3%11%3% x 11%
Group_20YOU11%33%11%33% x 11%
Group_20wwwtestcom18%6%11%6% x 11%
Group_500europe.web65%7%33%7% x 33%
Group_500curry_tag4%87%33%87% x 33%
Group_500YOU33%44%33%44% x 33%

 

Many thanks!

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @dax_rach 

try like:

 

 

 

Column = 
MAXX(
    FILTER(
        TableName,
        TableName[Group]= EARLIER(TableName[Group])
            &&TableName[DOMAIN]="YOU"
    ),
    TableName[PERC1]
) * [PERC2]

 

 

it worked like:

FreemanZ_0-1675692689331.png

 

View solution in original post

2 REPLIES 2
dax_rach
Frequent Visitor

It worked just as I needed it! Thank you very much! 

FreemanZ
Super User
Super User

hi @dax_rach 

try like:

 

 

 

Column = 
MAXX(
    FILTER(
        TableName,
        TableName[Group]= EARLIER(TableName[Group])
            &&TableName[DOMAIN]="YOU"
    ),
    TableName[PERC1]
) * [PERC2]

 

 

it worked like:

FreemanZ_0-1675692689331.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.