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.
Hi everyone,
I have complex formula to calculate the total sales in euro currency.
The formula is as follows:
Sales(Euro) = calculate( divide(YTD Sales Month; Exchange rate Month) - Divide( YTD Sales Month - 1 ; Exchange rate Month -1)) Exampl for Sales (Euro)of February= calculate(Divide( YTD Sales february ; Exchange rate February) - Divide( YTD Sales Janyary ; Exchange Rate January))
And for that i have three tables Sales_Table, CurrencyExchange_Table(date, local currency and value in euro) and Calendar Table. How you'r modeling this situation??!! (for me it gives me wrong total in case of sample formula as described or wrong results when i use Sumx and previous YTD)
Could anyone Help me Please!
Hi @dkozak
Assume "euro value" in my test file refers to value in euro per local currency unit.
So we could consider "euro value" as Exchange rate.
1.create two columns
connected_cl1 = [date]&[local currency]
# in rate table
connected_cl2 = [date]&[country]
#in sales table
2. create relationship between "sales table" and "rate table"
3. to get total sales in euro currency per month in a year
add [year],[month] from "calendar" table into the matrix "row" field,
create a measure and add it into "value" field of the matrix.
euro sales = MAX(sales[sales value])*MAX('rate table'[euro value])
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I did it before and it did not work, it gives us a wrong totals.
Any one have an idea ?
The problem is bigger 😕
I cant add my pbix to this post llike you did.
Regards
Hi @dkozak
Remove Private information from your file,
Upload your file to Onedrive,
Share the link with me
Best Regards
Maggie
Hello @v-juanli-msft ,
Thanks for your response, you find bellow the link to the PBix file and also the twos sources files( i put all files to let you even prupose a new modeling if i didn't correctly).
Link: https://1drv.ms/u/s!Ajh-Pr8pM0w_bG6WApK-LFWvwTU?e=F0I0Py
after lot and lot of try and Just to remind the problem: the problem is that we can't work with totalYTD and TotalYTD(previousmonth()) inside a Sumx(table, expression)
using the files in the drive(Sales file, Currency rates exhange file) my manager need the Sales reports in euro currency and using this formula of exchanging ( Sales Euro Month= divide(total sales YTD Month; Currency Exchange Rate Month) - divide(total sales YTD Month-1; Currency Exchange Rate Month-1)
Example: Sales Euro February = divide(total sales YTD February; Currency Exchange Rate February) - divide(total sales YTD January; Currency Exchange Rate January).
let me know if you need any more information
Thanks in advance
Link: https://1drv.ms/u/s!Ajh-Pr8pM0w_bG6WApK-LFWvwTU?e=F0I0Py
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |