Lookup from different table in Dax Measures

spycein

Board Regular
Joined
Mar 8, 2014
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,
I am looking for a dax function measure for powerpivot report which would return the value based on a lookup value from different table.
For Example,I have 2 tables as follows
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD]City Name[/TD]
[TD]State_Code[/TD]
[/TR]
[TR]
[TD]Mumbai[/TD]
[TD]MH[/TD]
[/TR]
[TR]
[TD]Pune[/TD]
[TD]MH[/TD]
[/TR]
[TR]
[TD]Chennai[/TD]
[TD]TM[/TD]
[/TR]
[TR]
[TD]Noida[/TD]
[TD]UP[/TD]
[/TR]
</tbody>[/TABLE]








[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD]Product_Name[/TD]
[TD]City[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]Computer[/TD]
[TD]Mumbai[/TD]
[TD]100000[/TD]
[/TR]
[TR]
[TD]Computer[/TD]
[TD]Noida[/TD]
[TD]70000[/TD]
[/TR]
[TR]
[TD]Computer[/TD]
[TD]Chennai[/TD]
[TD]80000[/TD]
[/TR]
[TR]
[TD]Computer[/TD]
[TD]Pune[/TD]
[TD]60000[/TD]
[/TR]
</tbody>[/TABLE]








The logic for the function i am looking for would be
if city name pertains to State_Code = MH then Tax Rate Would be 20%,
if city name pertains to State_Code = TM then Tax Rate Would be 18%
if city name pertains to State_Code = UP then Tax Rate Would be 15%
I dont want a calculated column, i want to create a dax measure for tax value.
Thank you so much in advance.
Best Regards
Shib
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Normalize your tax % into the dimension table and then it should be easy:




3Q8mBTg.jpg
 
Upvote 0
Thank you so much for your reply. But i am looking for a dax measure fuction. i dont want create any further table or column.
Kindly share your views on this.
Best Regards
Shib
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top