Forum Discussion

Gurpreetsingh1's avatar
1 year ago
Solved

Cuurncy conversion

Hi I have a query regarding currency conversion. I have 5-6 POS( Point of sales) CA, US, AU, NZ. I have a slicer Of POS when I select any single one then it is showing respective Cuurncy sales, but...
  • Anonymous's avatar
    Anonymous
    1 year ago

    lbendlin , thanks for your concern about this case. I tried to create a sample data myself based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is my solution:
    Hi  Gurpreetsingh1 ,

    Here are the steps you can follow:

    1. Create a table that contains the exchange rates for each currency relative to your desired base currency (e.g., USD or CAD).

    2. Create measure.

    USRate =
    var _rate=MINX(FILTER(ALL('RateTable'),'RateTable'[CurrencyA]=MAX('Table'[Point])&&[Convert CurrencyB]="US"),[Conversion rate])
    return
    SUMX(
        FILTER(ALL('Table'),'Table'[Point]=MAX('Table'[Point])),[Sales])
        *
    _rate
    CARate =
    var _rate=MINX(FILTER(ALL('RateTable'),'RateTable'[CurrencyA]=MAX('Table'[Point])&&[Convert CurrencyB]="CA"),[Conversion rate])
    return
    SUMX(
        FILTER(ALL('Table'),'Table'[Point]=MAX('Table'[Point])),[Sales])
        *
    _rate

    3. Result:

    If the results above don't meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you

     

    Best Regards,

    Liu Yang

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