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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## 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
Community Support

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

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.
Resident Rockstar

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

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

Anonymous
Not applicable

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

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Join our Community Sticker Challenge

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

#### Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors