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
ameera_williams
Regular Visitor

Months

Hello, i have created a viz that displays the months in chronological order for Planned vs Actual (see first screenshot), however i want to show a month by month comparison despite the year. For example i want to show Jan 2021 and then Jan 2022 next to it. Feb 2021 and then Feb 2022 next to it and so forth rather than how it is showing now. Like in the second screenshot that i created in Excel. Hope this makes sense, any help would be appreciated.

Months PBI.JPG

Months Excel.JPG

2 REPLIES 2
amitchandak
Super User
Super User

@ameera_williams , Create this year vs last year's measure.

 

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

or

 

This year Month = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) && 'Date'[Month] = Max('Date'[Month]) ))
Last year Month = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year])-1 && 'Date'[Month] = Max('Date'[Month])))

 

Thanks Amit. I have created the measure, what do i do with it now?

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.