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
samflynn
Frequent Visitor

Repeat value for each row

I have the following table: 


Where $ Amount, net wt, are measures. (both are basically Amount USD and Net Weight, but with a RELATEDTABLE() filter)

CostPerLb = [$Amount]/[net wt]

 

 

 

Capture.PNG

 

I want the value 0.1458 to repeat for each row in the avg CostPerLb (for example). 

My end goal with this is that: I can multiply the average (0.1458) to Net Weights that have no Amount associated with them to get a amount value for all the shipments in the table. 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Your measur of avg CosrPerLb should be something like this

 

=IF(ISBLANK([$Amount]),CALCULATE([CostPerLb],ALL(Data[BillofLad]),ALL(Data[Shipment])),[your existing measure of avg CosrPerLb])

 

Does this work?

 

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Your measur of avg CosrPerLb should be something like this

 

=IF(ISBLANK([$Amount]),CALCULATE([CostPerLb],ALL(Data[BillofLad]),ALL(Data[Shipment])),[your existing measure of avg CosrPerLb])

 

Does this work?

 

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
MFelix
Super User
Super User

Hi @samflynn,

 

Believe that you want to have the total value for all the table just change you measure to:

 

CostPerLb =CALCULATE([$Amount]/[net wt]; ALL(Table[Colum]))

This will give you the same result for all rows.

 

However the way you set up your question is not perceivable what you want please check https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 in order to get a better answer ( @Greg_Deckler post a great datanaut).

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.