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

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.

Reply
Anonymous
Not applicable

Current period this month vs previous period

Hi guys,

I hope you can help me with this. Basically I got weight for each container in one column and date from 2019/01/01 to current date.  I want to compare current month up to today(let's say only 5 days). So if today is the fifth of November, I would need it to compare to five days of last years November. Additionally, I would need to sum up those numbers in those 5 days in every column. Any help with this? I hope im making sense here. Attaching a picture of what I currently have. 

Gediminas12_0-1604667658484.png

 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , with help from a date table you can use a year behind measure .

If you need MTD

then try

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Anonymous
Not applicable

@amitchandak  this is what I get: For some reason current month up to date sales remains empty.

Gediminas12_0-1604671433009.png

 

Hi @Anonymous ,

 

Could you pls upload your .pbix file to onedrive business and share the link with us?

Remember to remove the confidential information.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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