Forum Discussion
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
- Phil_Seamark
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.
- sudhakar111
Helper IV
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.