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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
sudhakar111
Helper IV
Helper IV

Previous Period Calculation

Hello guys,

 

I need some help in calculating the previous period based on current year selection.

 

We are showing the data in a bar chart, which will only have current year data in months. For example the bar chart will have 2 bars for january and february for 2018. If a selection is made for january or February or both,the data should be shown in a separate table. The table should show the current year values as well as previous years based on selection of bar chart. Tried parralel period and sameperiod last year functions but doesn't seem to be working. The data for the report is coming from a single fact table.

 

Thanks and Regards,

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @sudhakar111

 

Do you have a separate date table?  DAX functions like PARALLELPERIOD and SAMEPERIODLASTYEAR prefer to work with date columns in a separate date table.  


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi Phil,

 

I do have a separate date table. Using any of Parallelperiod or Sameperiodlastyear gives me the values for the whole month of march for last year instead of  month to date lat year.

 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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