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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
newhopepdx
Helper I
Helper I

Comparing donations from two paralell periods

The project is driven by a database of donation history for several years. I'm wanting to compare total donations for two paralell 12-month periods in a matrix showing total donation by donor, count of donations and average donation for the period, and secondarliy display a table for both periods with the corresponding amounts and dates of donation.

 

I have a working solution, but it requires two slices set independantly. It uses a cloned, second "Comparison" date table (with a relationship to the main date table). The Comparison Date table is linked to the Period 1 "between" slicer. 

 

What I'm looking for is a way to dispense with the Period 1 slicer and filter the data for the comparison period to be one year prior to the dates set in a single range date slicer (Period 2, in the current case). Is this possible?

pp1.jpgpp2.jpg

Period 1 data is driven by the Comparison Date table and this measure:

pp3.jpg

1 ACCEPTED SOLUTION
martincurbelor
Regular Visitor

Sould it works to create a Measure for the period 2?
Like:
CALCULATE(
  [Donations],

  SAMEPERIODLASTYEAR(Calendar, [Date])
)

There you will have both KPIs with just one slicer selected.

View solution in original post

2 REPLIES 2
newhopepdx
Helper I
Helper I

Thanks!

Clearly overlooked the simple solution. Trying to make it too complicated.

martincurbelor
Regular Visitor

Sould it works to create a Measure for the period 2?
Like:
CALCULATE(
  [Donations],

  SAMEPERIODLASTYEAR(Calendar, [Date])
)

There you will have both KPIs with just one slicer selected.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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