I have a Power BI report with two tables in it. Table_1 looks like this:
| Tariff_name | ID |
|---|---|
| Tariff_1 | ID1 |
| Tariff_2 | ID2 |
| Tariff_3 | ID3 |
Table_2 looks like this:
| Tariff_name | ID |
|---|---|
| Tariff_33 | ID2 |
| Tariff_44 | ID1 |
| Tariff_55 | ID3 |
Tables join by ID column with many to many and both selection.
I have made two slicer for these two tables.
Now I want that, while I select any tariff from the first table, the shape (card, textbox or another) show alternative tariff from table_2.
I have written this code but gives blank:
Selected Table_2 Alternative =
VAR SelectedID =
SELECTEDVALUE(Table_1[ID])
RETURN
IF(
NOT ISBLANK(SelectedAlternativeID),
CALCULATE(
SELECTEDVALUE(Table_2[Tariff_name]),
Table_2[ID] = SelectedID
),
""
)
How can I solve this?