cancel
Showing results for
Did you mean:
Occasional Visitor

## Using date slicer with parallel period

I would like to achieve the following:

1. Use a report slicer filter on a month year combination (January 16, February 16, ...)
2. Show both the Amount for current date filter (month + year) and the Amount for the previous month and the Amount for the same month previous year

I currently use a slicer (date format) with bins per month.

Next to that I have the following Amounts (as a Card):

• Amount: CALCULATE(SUM('personalfinance banktransactions'[AMOUNT]),FILTER(ALL('personalfinance banktransactions'[DATE]),'personalfinance banktransactions'[DATE]<=MAX('personalfinance banktransactions'[DATE])))
• Amount Previous Month = calculate(SUM('personalfinance banktransactions'[AMOUNT]), PARALLELPERIOD('personalfinance banktransactions'[DATE].[Date],-1,MONTH),FILTER(ALL('personalfinance banktransactions'[DATE]),'personalfinance banktransactions'[DATE]<=MAX('personalfinance banktransactions'[DATE]) && YEAR ( 'personalfinance banktransactions'[DATE] ) < MAX ( 'personalfinance banktransactions'[CalendarYear] )))
• Amount Previous Year = calculate(SUM('personalfinance banktransactions'[AMOUNT]), PARALLELPERIOD('personalfinance banktransactions'[DATE].[Date],-12,MONTH),FILTER(ALL('personalfinance banktransactions'[DATE]),'personalfinance banktransactions'[DATE]<=MAX('personalfinance banktransactions'[DATE]) && YEAR ( 'personalfinance banktransactions'[DATE] ) < MAX ( 'personalfinance banktransactions'[CalendarYear] )))

Problem: When I filter on the date (month + year), I do not get results for the Amount previous Month & Amount Previous Year values. How can I fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Using date slicer with parallel period

You may refer to the .pbix attached.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Community Support Team

## Re: Using date slicer with parallel period

You may refer to the .pbix attached.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Using date slicer with parallel period

This is great for learning how to use dates for comparisons in DAX.  Thanks

Highlighted
Senior Member

## Re: Using date slicer with parallel period

I tried PARALLELPERIOD function. it returns blank. Kindly assist me.

FYI - I'm using BigQuery tables and it is DirectQuery.