Forum Discussion
Multiplying column with different values in another table
Hello Everyone, I need help, the case is the next:
I have a table with a lot of transactions (invoiced sales, quantities, part numbers) and I have another table with the white list price by country (the "white list price" include all prices without discounts), so I'd like to add a new column with the invoiced sales with the "white list price" according to the countries.
I hope someone can help me.
You can have new columns like
white list price = Minx(filter('white list price','white list price'[country] ='transactions '[country] ),'white list price'[price]) or white list price = Minx(filter('white list price','white list price'[country] ='transactions '[country] && 'white list price'[item] ='transactions '[item]),'white list price'[price])
2 Replies
- Greg_DecklerCommunity Champion
So, sample data would be tremendously helpful. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Assuming you have a Country column in your first table, you could do something like this:
Column = VAR __Country = 'Table'[Country] VAR __WhiteListPrice = LOOKUPVALUE( 'White List Price Table', 'White List Price Table'[White List Price], 'White List Price Table'[Country], __Country ) REUTRN __WhiteListPrice - amitchandakSuper User
You can have new columns like
white list price = Minx(filter('white list price','white list price'[country] ='transactions '[country] ),'white list price'[price]) or white list price = Minx(filter('white list price','white list price'[country] ='transactions '[country] && 'white list price'[item] ='transactions '[item]),'white list price'[price])