Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
A measure that calculate
if A.currency = B.currency then(these conditions may be different)
mymeasure = A.measure(sum of price) * B.Exchangerate
How i can achieve this please help!
Solved! Go to Solution.
Hi @Anonymous ,
Please try to use below formula, I create a summary variable table to stored total sales and correspond exchange rate for calculate:
Result = VAR summary = SUMMARIZE ( T1, [Currency], "Total Sales", SUM ( T1[Sales value] ), "Ex rate", LOOKUPVALUE ( T2[Exchange Rate], T2[Currency], [Currency] ) ) RETURN SUMX ( summary, [Total Sales] * [Ex rate] )
Regards,
Xiaoxin Sheng
HI @Anonymous ,
I think it will be help if you share table structures and sample data for test and coding formula .
Regards,
Xiaoxin Sheng
hi thanks for your reply please find below table structure with sample data
Table 1 | ||||
Currency | Date | Sales value | New Measure | |
AED | 01-01-2019 | 100 | Sum of sales value currency wise per month | |
AED | 02-01-2019 | 110 | ||
AUD | 02-01-2019 | 120 | ||
Table 2 | |
Currency | Exchange Rate |
AED | 0.21 |
AUD | 0.71 |
i need
my measure = New Measure*Exchangerate (currency wise grouped)
i.e for AED
new measure = 110 +100
mymeasure = new measure * Exchangerate(0.21)
Hi @Anonymous ,
Please try to use below formula, I create a summary variable table to stored total sales and correspond exchange rate for calculate:
Result = VAR summary = SUMMARIZE ( T1, [Currency], "Total Sales", SUM ( T1[Sales value] ), "Ex rate", LOOKUPVALUE ( T2[Exchange Rate], T2[Currency], [Currency] ) ) RETURN SUMX ( summary, [Total Sales] * [Ex rate] )
Regards,
Xiaoxin Sheng
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |