Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
KevBI
Helper I
Helper I

Problem with Measure total while using sumX

Hello PowerBI Pro's !

I have a small Measure that takes Values and divides it with an exchange Rate. Somehow the Totals don't add up correctly even when using sumX.

Total PO Value = SUMX('EKPO (2)', [Net Order Value]) / EKBE[_ExchangeRate]

 

I made a second Measure without the exchange Rate and there the total is calculated correctly ->

PO value without exchnage rate = SUMX('EKPO (2)', [Net Order Value])

 

KevBI_0-1660557011569.png

The Exchange Rate Measure looks like this:

_ExchangeRate =
VAR
    _currency = max(EKBE[Currency])
VAR
    _conversionRate =
    CALCULATE(
            MAX( 'exch  rate AOP 2022'[Exchange Rate new Format])
            , 'exch  rate AOP 2022'[Currency] = _currency
    )
RETURN
_conversionRate

What can be changed so the total will be shown correctly even when the value is divided by the exchange rate?

Thank you guys!

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @KevBI ,

 

If I understood you correctly, you could use ISFILTERED() function to calculate the row value and total value separately.

If I misunderstood your meaning, please share some sample data so that we could test the formula.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
KevBI
Helper I
Helper I

I also tried this Measure out :

_ExchangeRate2 =

VAR
_currency = max(EKBE[Currency])
VAR
_conversionRate =
Sumx(Values(EKBE[Purchasing Document]) , CALCULATE(
MAX( 'exch  rate AOP 2022'[Exchange Rate new Format])
, 'exch  rate AOP 2022'[Currency] = _currency
))

RETURN
_conversionRate

nothing seems to work...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.