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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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