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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Calculating measure value for current year and month from one table to another table


Hi Community,

 

I was trying to calculate last year month sales based on current year and month sales.

I have a Table 1 contains data from 2018-01-01 to 2019-04-31 with sales  and

I have Table 2  contians data for 2019-04-31 with sales

Now my requirement is that I want to filter the table 1  for 2018-04-31 based on table 2 data.

 

Any help on this

 

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You could SAMEPERIODLASTYEAR Function to add a measure:

https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax

Create a date table, then create a relationship with table1 and table2 as a bridge.

 

Best regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.