Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have some problem with SUMX function. I want to sum usd amount (Discount / USDRate) when i select to different countries with different currency. So...
I have data like this :
And i have two measures that i use;
2-) one measure for DiscountGroup = "Coupon" and one measure for DiscountGroup = "Referral"
My problem is; I select 2 countries with different currencies, calculate works fine for "Referral" because filtered OrderTable has both country values. But it doesn't work for "Coupon" because filtered OrderTable (DiscountGroup filter) has just one value for country so it doesn't make calculation.
I tried to use HASONEVALUE(CountryId) with multiple different ways but result didn't change.
Is there any suggestion?
Thanks
Solved! Go to Solution.
Hi @Ewo ,
Thanks for the clarifications.
Please use below measures.
Hi @Ewo ,
You can create teh following measures.
Hi harshnathani,
Thank you for reply but i don't want to convert all to USD currency. what i wanna do is; to make usd conversion if selected countries has different currencies.
To be clear, if i select only Spain in filter, it will be local currency (EUR) in table.
If i select Spain and England, it will be USD currency.
Result must be like this;
Hi @Ewo ,
Thanks for the clarifications.
Please use below measures.
Thank you for your support @harshnathani
That worked well and i think i understand the problem in my measures. Filtering sequence is a little confusing for me 🙂
Please correct me if i wrong;
For exmp. if i use 3 different function (dax exprasion) with filters. It starts filtering from outside right?
It's like;
Calculate1(
Calculate2(
Calculate3(
Expression,
Filter3
)
,
Filter2
)
,
Filter1
)
In that scneario Filtering starts with Filter1 and goes inside right?