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

Reply
betterdays
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
v-chuncz-msft
Community Support
Community Support

@betterdays,

 

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.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@betterdays,

 

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.

@v-chuncz-msft,

 

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors