cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chutchut09
New Member

Multi currency reporting question

I have sales fact table that has columns for sales in local currency, Sales in USD, Sales in EUR, Sales in GPB and the local currency code.

I have a exchange rate table that reports each currency exhange rate against the 3 reporting currencies. Instead of reporting by just 3 currencies we want to report by all the different local currencies. I created a measure called Sales currency, so we are going from just the USDs to multi-currencies. 

 

chutchut09_0-1685820531618.png

My questions are,

1) Is there a way to leverage just the sales amount in local currency columns and total sales displayed by default currency of usds (when nothing is selected)?

Thank you in advance. Link to the power bi report

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @chutchut09 ,

 

I suggest you to create an unrelated Currency Code table for slicer.

Sales Currency =
IF (
    MAX ( 'Dim Currency'[Currency Code] )
        IN VALUES ( 'Slicer Currency'[Currency Code] ),
    IF (
        ISFILTERED ( 'Slicer Currency'[Currency Code] ),
        IF (
            ISCROSSFILTERED ( 'Dim Currency' ),
            VAR SelectedCurrency =
                SELECTEDVALUE ( 'Dim Currency'[Currency Code], "USD" )
            VAR DatesExchange =
                SUMMARIZE (
                    FILTER (
                        'Fact Exchange Rate',
                        'Fact Exchange Rate'[Reporting Currency] = "USD"
                    ),
                    'Fact Exchange Rate'[MMM-YYYY],
                    'Fact Exchange Rate'[Exchange Rate]
                )
            VAR Result =
                IF (
                    NOT ISBLANK ( SelectedCurrency ),
                    IF (
                        SelectedCurrency = "USD",
                        [Total Sales_USD],
                        SUMX ( DatesExchange, [Total Sales_USD] * 'Fact Exchange Rate'[Exchange Rate] )
                    )
                )
            RETURN
                Result
        ),
        [Total Sales_USD]
    )
)

Result is as below.

vrzhoumsft_0-1686032073536.png

vrzhoumsft_1-1686032081424.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
chutchut09
New Member

I decided to keep what I have. I know the ask is a bit bizzare. It works! thank you for posting this alternative solution. 

v-rzhou-msft
Community Support
Community Support

Hi @chutchut09 ,

 

I suggest you to create an unrelated Currency Code table for slicer.

Sales Currency =
IF (
    MAX ( 'Dim Currency'[Currency Code] )
        IN VALUES ( 'Slicer Currency'[Currency Code] ),
    IF (
        ISFILTERED ( 'Slicer Currency'[Currency Code] ),
        IF (
            ISCROSSFILTERED ( 'Dim Currency' ),
            VAR SelectedCurrency =
                SELECTEDVALUE ( 'Dim Currency'[Currency Code], "USD" )
            VAR DatesExchange =
                SUMMARIZE (
                    FILTER (
                        'Fact Exchange Rate',
                        'Fact Exchange Rate'[Reporting Currency] = "USD"
                    ),
                    'Fact Exchange Rate'[MMM-YYYY],
                    'Fact Exchange Rate'[Exchange Rate]
                )
            VAR Result =
                IF (
                    NOT ISBLANK ( SelectedCurrency ),
                    IF (
                        SelectedCurrency = "USD",
                        [Total Sales_USD],
                        SUMX ( DatesExchange, [Total Sales_USD] * 'Fact Exchange Rate'[Exchange Rate] )
                    )
                )
            RETURN
                Result
        ),
        [Total Sales_USD]
    )
)

Result is as below.

vrzhoumsft_0-1686032073536.png

vrzhoumsft_1-1686032081424.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors