Last answered:

16 Oct 2023

Posted on:

16 Oct 2023

0

TreatAs for Virtual relationship

For the first measure created at the begining of the lesson which is ;

1 Currency Conversion = 
2 var salesEUR = SUM(factInternetSales[Sales Amount EUR])
3 RETURN
4 CALCULATE(salesEUR, TREATAS(VALUES(dimCurrency[CurrencyAlternateKey]),'factinternetsales'[Currency Code]))


we created a virtual relationship between dimCurrency & factinternetsales.


My question is why when we select any of the currencies from the currency code derived from fact table the filter works and gives the correct sales amount. for example selecting USD shows 13 M, while on selecting the currency from "currency alternative key filter", it doesn't work. It gives all the time 24 M although their is an established virtual relationship between fact table & dim currency.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Oct 2023

0

I would say check your data model and table relationships. If you are using the same DAX as shown in the video, you should be able to filter by the alternate key

Submit an answer