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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Fergal2
Regular Visitor

Basic Beginners Question. Getting a value from another table into a table

Hi all

I am trying do something simple. 

I have a table with a quantity and I want to multiply it by value per unit to get a total value.

I am trying to pull that value into the table using Lookupvalue

Salesprice = LOOKUPVALUE('Sales Price Per Unit'[$ Sales Price Per Unit], 'Sales Price Per Unit'[ProductId],  1)
I've tried blank and zero
"Function 'LOOKUPVALUE' does not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values."
Am I usingthe wrong function, am I looking up the wrong things?
I know its very basic but I'm confused. I can find lots of questions with more complex setups.
 
 
Fergal2_0-1721126905844.pngFergal2_1-1721126996442.pngFergal2_2-1721127061947.png

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Fergal2 ,

 

Try using below measure

 

Salesprice = LOOKUPVALUE('Sales Price Per Unit'[$ Sales Price Per Unit], 'Sales Price Per Unit'[ProductId], [ProductId])


TotalValue = [Quantity] * Salesprice




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

6 REPLIES 6
Fergal2
Regular Visitor

I fixed the table so the column was no longer a text and is now a number and it worked. Thanks again for your help and the Measure

Fergal2
Regular Visitor

Fergal2_0-1721127614217.pngFergal2_1-1721127644906.png

 

bhanu_gautam
Super User
Super User

@Fergal2 ,

 

Try using below measure

 

Salesprice = LOOKUPVALUE('Sales Price Per Unit'[$ Sales Price Per Unit], 'Sales Price Per Unit'[ProductId], [ProductId])


TotalValue = [Quantity] * Salesprice




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






I get a similar error

Fergal2_0-1721127790744.png

 

Fergal2_1-1721127888348.png

Is it because its text in this table?

 

Fergal2_2-1721127953721.png

 

Do I need to reimport the table and ensure its a number?

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.