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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Jizquierdo
New Member

Formula DAX

Good morning everyone, starting with power bi and first time on the forum
I have a question and I hope you can help me.

I have the following formula

USDSalesLYTD =
SUMX(
'DWH Made_Sales',
YEAH(
'DWH Fact_Sales'[Country_ID] = 1,
[SalesLYTD] / 575, IF( 'DWH Fact_Sales'[Country_ID] = 2,
[SalesLYTD] / 7.68, [SalesLYTD] * 1
)
))

which gives me a result in the blank table

Jizquierdo_0-1721236857554.png

 

 

the SALESLYTD formula

SalesLYTD = CALCULATE([NetSales],SAMEPERIODLASTYEAR(Dim_Time[Date]))

What I am looking for is to calculate last year's sales in the same period and then apply a currency exchange according to the country code

1 REPLY 1
Anonymous
Not applicable

Hi @Jizquierdo 

 

What are the fields in the DWH Made_Sales and DWH Fact_Sales? Are there any relationships between the two tables?

Please share some data(exclude sensitive data), or create some sample data, so that we can help you better.

You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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