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, all!
I have an issue that I can't overcome.
I have one table Coffee with countries, sales in EUR and volume of sale
and I have other table with countries, EUR, CHF
Question -how I can calculate total Sales in Eur and Total Sales in CHF?
Thank you in advance!
Solved! Go to Solution.
Hi @key_master_95 ,
Your data table may be complicated, if possible, please provide a simplified sample data for us to test, thank you.
This is a test dataset I created myself and I'm not sure if it matches the data model you are using:
I am using the following two DAXes for this calculation:
Total Sales in EUR =
SELECTEDVALUE(Coffee[sales in EUR(unit price)]) * SELECTEDVALUE(Coffee[volume of sale])
Total Sales in CHF =
SUMX('Coffee', 'Coffee'[Total Sales in EUR] / RELATED('Table'[EUR]) * RELATED('Table'[CHF]))
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
with country columns related it should work just the same. Only requirement would be that both need to be in the same data type (text) and both contain the same values: BE-BE or Belgium-Belgium. I am suposing here that in the country/currency table you have only one line per country. Please shere the error message.
Hi @key_master_95 ,
Your data table may be complicated, if possible, please provide a simplified sample data for us to test, thank you.
This is a test dataset I created myself and I'm not sure if it matches the data model you are using:
I am using the following two DAXes for this calculation:
Total Sales in EUR =
SELECTEDVALUE(Coffee[sales in EUR(unit price)]) * SELECTEDVALUE(Coffee[volume of sale])
Total Sales in CHF =
SUMX('Coffee', 'Coffee'[Total Sales in EUR] / RELATED('Table'[EUR]) * RELATED('Table'[CHF]))
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The best solution would be to have a relationship between the coffee sale table and the rate table
Next, you can use a measure:
or calculate a column.
Hi!
Thank you for the answer.
I can't build relation like Currency to currency 'cos in Coffee table haven't currency - only contries.
I tried to implement your formula with connection Country to Contry, but it didn't work - PBI can't find related table (it's text of error)
with country columns related it should work just the same. Only requirement would be that both need to be in the same data type (text) and both contain the same values: BE-BE or Belgium-Belgium. I am suposing here that in the country/currency table you have only one line per country. Please shere the error message.
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.