Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to retrieve value between two tables based on multiple slicer values

I am trying to work on a scenario where I have two tables and I need to look up in table2 based on multiple slicer values coming from one table. Below are the details and your inputs are highly appre...
  • Anonymous's avatar
    Anonymous
    7 years ago

    v-lili6-msft thanks for looking into it. My file is so large to share and I got what I wanted anyway. I was able to select multiple and filter by companycodes using AllSelected function modfiying my exisitng DAX

     

    exchangeRateCalculate =

    var Exch = CALCULATE(Sum(TABLE2[exch_rate]), table1(companycode in allselected (table1[Companycode]),

    TABLE2[fromcurrency] in values (table1[fromcurrency] ,TABLE2[tocurrency] in VALUES(TABLE2[tocurrency]),TABLE2[rate_type] in VALUES(TABLE2[rate_type]),FILTER(TABLE2,TABLE2[rateeffectivefromdate] <= [SelectedDate] && TABLE2[rateeffectivetodate] >= [SelectedDate])

    return exch