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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tommuirwebb
Frequent Visitor

New measure to take the value from 1 row and apply it to all rows in the table

I have a simple table with columns Fruit and Cost. I would like to add a new measure which takes the value of Cost where Fruit="Pear" and apply it to all rows like so:

 

Fruit

Cost

New measure

Apple

1.0

1.2

Pear

1.2

1.2

Banana

0.9

1.2

Orange

0.8

1.2

 

 

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @tommuirwebb 

You may try below measure:

Measure =
CALCULATE ( [Cost], FILTER ( ALL ( Table1 ), Table1[Fruit] = "Pear" ) )

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @tommuirwebb 

You may try below measure:

Measure =
CALCULATE ( [Cost], FILTER ( ALL ( Table1 ), Table1[Fruit] = "Pear" ) )

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This answer worked for me. Thanks so much for your help.

Anonymous
Not applicable

@tommuirwebb  - Create this Measure:

Pear Value = CALCULATE(MAX(FruitTable[Cost]), FruitTable[Fruit] = "Pear")

Hi natelpeterson, thanks for your reply. I had tried this already but this only applies the value for the row which contains Pear. I'd like the Cost value for Pear to apply to all rows in the table.

 

Anonymous
Not applicable

@tommuirwebb -

It's working here:

Pear.PNG

What is happening there?

Cheers,

Nathan

Ok, so I should start by saying I'm new to PowerBI so forgive me if I've missed something fundamental here. In my example, the Cost column is actually a Measure which is a calculated average price for each fruit. I'm guessing this is why I'm seeing different results?

Anonymous
Not applicable

@tommuirwebb  - Try this:

Pear Cost = CALCULATE([Cost], FruitTable[Fruit] = "Pear")

Thanks again, but unfortunately I get the same result. It only applies the value for the row which contains Pear.

Anonymous
Not applicable

@tommuirwebb  - could you share your pbix or a screenshot of the model diagram + the code of the Cost measure?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.