cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudhakar111 Regular Visitor
Regular Visitor

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
Super User
Super User

Re: Previous Period Calculation

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!

sudhakar111 Regular Visitor
Regular Visitor

Re: Previous Period Calculation

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.