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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Litybe
Regular Visitor

Display two graphics with two different date

Hello,

 

 

I have a little question. I want to display two graphics, the first one with a date I choice ( for exemple 13/11/2016) and the second with the same data but 1 year before so 13/11/2015 in this case.

I have no trouble to display the first one, but i don't find a solution to display the second graphics with -1 year.

 

Have a nice day.

2 REPLIES 2
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Litybe,

 

You could use SAMEPERIODLASTYEAR function to get last year data. This function returns a table that contains a column of dates shifted one year back in time from the dates in the specified dates column, in the current context.
https://msdn.microsoft.com/en-us/library/ee634972.aspx

 

Regards,

Charlie Liao

Litybe
Regular Visitor

Hello,

 

 

I have a little question. I want to display two graphics, the first one with a date I choice ( for exemple 13/11/2016) and the second with the same data but 1 year before so 13/11/2015 in this case.

I have no trouble to display the first one, but i don't find a solution to display the second graphics with -1 year.

 

Have a nice day.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.