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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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