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
Anonymous
Not applicable

Current row column value

Hi !

I'm creating a calculated column. For each calculated row of the column, I need the value of another column of the table, on the same row.

I called this value _weight and I calculated like this :

VAR _weight = CALCULATE(ShipDetails[NET_WEIGHT_LBS])
I thought this would work since the CALCULATE function generates a row context (?) but an error message is shown, saying that it cannot find a unique value for the ShipDetails[NET_WEIGHT_LBS] column.
I feel like this should be very easy but I don't know why it doesn't work or what I should do.
Please help me !
Thank you.
1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

You can just use

 

var _weight = ShipDetails[NET_WEIGHT_LBS]

 

 

You can have a look at this video to understand more on Context Transition.

https://www.youtube.com/watch?v=03E0f-RyRn4

 

Regards,

Harsh Nathani

View solution in original post

3 REPLIES 3
Pragati11
Super User
Super User

Hi @Anonymous ,

 

You have to use an aggregation function in your DAX like SUM, AVERAGE, etc.

Something like this:

VAR _weight = CALCULATE(SUM(ShipDetails[NET_WEIGHT_LBS]))

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

You can just use

 

var _weight = ShipDetails[NET_WEIGHT_LBS]

 

 

You can have a look at this video to understand more on Context Transition.

https://www.youtube.com/watch?v=03E0f-RyRn4

 

Regards,

Harsh Nathani

Anonymous
Not applicable

Thank you very much @harshnathani !

 

Regards,

Marion

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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