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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Pravallika-gadd
New Member

Line chart

Hi 

In line chart I want to show current year vs previous year but in my case current year we are in june means current year value is showing upto june and for year 2023 also showing upto june 2023 it is not showing upto jan to Dec in 2023 

Could anyone help me on this what might be the reason?

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1720464460064.png

 

 

Jihwan_Kim_0-1720464447428.png

 

Sales current year: = 
SUM(sales[sales])

 

Sales previous year: = 
CALCULATE ( [Sales current year:], SAMEPERIODLASTYEAR ( calendar_dim[Date] ) )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

foodd
Community Champion
Community Champion

Hello @Pravallika-gadd , thank you for sharing a question with the Community.  This reply is informational. Please follow the decorum of the Community Forum when asking a question.

Please share your work-in-progress Power BI Desktop file (with sensitive information removed) and any source files in Excel format that fully address your issue or question in a usable format (not as a screenshot). You can upload these files to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then provide the file's URL.

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

 

If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.  Proud to be a Super User!

Thank you , for solution but I don't have calender table am taking the shipdate column from delivery table same shipdate only am using in the formula for current year and previous  year

Anonymous
Not applicable

Hi,@Pravallika-gadd 

Has the problem been solved? If it's solved, share your solution and accept it as a solution, which will help members of the community who have the same problem as you find a solution faster.

 

If not, please share your data.I would be grateful if you could provide me with the pbix file or sample data.Remember to remove sensitive data .

 

If you have any other questions please feel free to contact me.

 

Best Regards,

Leroy Lu

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.