Hi all,
Please see attached simplified pbix:
Multiple Currency Codes in Single Fact.pbix (66.4 KB)
I have a very simple fact table [Sales], containing 6 order lines from 3 different regions: UK, Australia and Europe. Each line has the local currency code stamped on it:
We need the ability to convert the Order Line value into either GBP, EUR or leave as the local currency, which will be the default. The user does this by selecting the Curreny Code from a lookup table, ‘Report Currency’:
I have created a measure [Converted Value] which does this.
When the Currency is set to ‘Local’, the [Converted Value] matches that of the original Order Value, but the measure outputs the relevant currency symbol which it retrieves from dim table [Reporting Currency Symbols], based on the Currency Code stamped on the line.
Note that the total line does not output the currency, if the table contains a mix of currencies:
And when the Currency is set to GBP or EUR, the measure converts all values to that currency, based on rates found in table [Exchange Rates] and the Total line does now output the symbol as all values are of the same currency.
I was really pleased with this result, but have found that if I add column ‘Region’ from my ‘Regions’ dim table, that the table starts to include blank rows:
I’ve also found that if I remove the FORMAT function from my [Converted Value] measure, which is what outputs the correct currency symbol then the table behaves as expected?
So I am confused as to why when adding a field from a dim table that the measure stops working as expected, but if I remove the FORMAT function it is ok.
Many thanks
Mark