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
burak
Frequent Visitor

New Measure inside Matrix

I have created a matrix that calculates number of students for every semester. But my issue is creating a calculation that shows difference between semesters. For example, I have 5,000 students for Spring 2016 and 4,000 student for Spring 2015. How can I calculate Spring 2016 - Spring 2015 and show 1,000 difference.

 

Thank you.

2 REPLIES 2
Anonymous
Not applicable

Assuming you do not have a datetable your data looks most likely like this

 

Year (or semester) - Name

1999 (Semester X) - John Malkovich

2001 (Semester 2) - Ricky Martin

...

 

One of the column must be your 'date column' somehow so you can have dates or semesters on your x-axis 

 

The measures are quite trivial after that

 

No. of students YTD = CALCULATE(DISTINCTCOUNT((Name Column)) , DATESYTD(Date Column))

where YTD is short for Year To Date


No. of students LY = CALCULATE([No. of students YTD] , SAMEPERIODLASTYEAR(Date Column))

where LY is short for Last Year

 

Figure this one out... and you will figure out why datetables are really useful

 

google... ehm.. sorry BING is your friend

 

 

 

 

Sean
Community Champion
Community Champion

Do you have a Date Table? To make time intelligence functions work you will need one.

 

see if this post help you => http://community.powerbi.com/t5/Desktop/Compare-MTD-with-previous-period/m-p/24656#U24656

 

also try this => http://community.powerbi.com/t5/Desktop/Time-Intelligence-YTD-SamePeriodLastYear-Odd-behavior/m-p/14...

 

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.