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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Comparing dates, current year months with 2019 same months

I have monthly data from few years and i need to compare this years months with selected year for e.g. 
2023/1 with 2019/1
and so on until i reach the maximum months that i have of current year, right now i have until 2023 august

7 REPLIES 7
Anonymous
Not applicable

in your pbi result is 

Zygis123_0-1699854230034.png

when i put my data in i get 

Zygis123_1-1699854257960.png


you get 8 months i get 12

 

pls try this code

Screenshot_6.png

Ahmedx
Super User
Super User

pls try

 

Anonymous
Not applicable

Zygis123_0-1699849240090.png

how does it work? if i select sales and months should it be all 12? sales is just sum(data[value]) why it calculates just the 8?

Is this what you are looking for?

Screenshot_2.png

Anonymous
Not applicable

Zygis123_0-1699853685558.png

i get the right year but too many months

 

 

what do many months mean?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors