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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Previous year DAX measure

Hi - I'm trying to create a measure that calculates the previous year's value i.e. for 2015 it would show 346 (6617-6271). 

 

I've tried SAMEPERIODLASTYEAR and PARALLELPERIOD with no success - the "year" column is a product of powerpivot auto generating separate date fields (month, quarter, year) based on a single date column in the data i.e. The "year" in the table below is actually ServiceDate(Year) in the field list and is based off a field called ServiceDate. Hoping someone can help out with this, thanks in advance!

 

 

 

Year                  Unique Patients 

20146,271
20156,617
20166,544
20176,118
1 ACCEPTED SOLUTION
Anonymous
Not applicable

resolution in case it helps someone else: 

 

 

PatientsRaw = table name

 

Unique Patients = DISTINCTCOUNT(PatientsRaw[PersonID])

 

UniquePatientDiff = [Unique Patients] - CALCULATE([Unique Patients],FILTER(ALLEXCEPT(PatientsRaw,PatientsRaw[PayorName]),[CalendarYear]=MAX([CalendarYear])-1))

View solution in original post

18 REPLIES 18

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.