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
Just2431
Frequent Visitor

create a line chart comparing last years month to this year months

HI have a dataset with the last year data wich is seperated by month, project category and hours spent and then I have data for this for this new year ( right now i have 2 month data, Janaury and February) and I am tryint to show the trend last year vs this year that will update automatically once refreshed. Can anyne help me with this one? Thank you in advance

I attached a picture showing when i first add the data into the table that the sum of the man hours should be just showing by the january and february, now for every month and the value of course should reflect the current values for each month.

Just2431_0-1711048707508.png

 

2 REPLIES 2
v-xuxinyi-msft
Community Support
Community Support

Hi @Just2431 

 

Thank you @ronaldbalza2023 for your reply, and allow me to offer another insight:

 

If I understand correctly, you want to show each month the corresponding value belonging to the current month? Then you can do so:

 

Please change the corresponding field to "Don't summarize".

vxuxinyimsft_0-1711086689903.png

 

Best Regards,
Yulia Xu

 

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

ronaldbalza2023
Continued Contributor
Continued Contributor

use DATEADD function or SAMEPERIODLASTYEAR ie.

PriorYear = CALCULATE([YourMeasure],DATEADD(DateTable[Date],-1,year))

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.