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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Jay2077
Helper III
Helper III

DAX New Measure Calculation Help

Hi, I am trying to write a simple new measure calculation for this test report 

 

I have 2 tables like below, code refers to an album 

 

I just want to do something like albumlength = calculate(sum(album title Abbey Rd 

 

etc 

 

Jay2077_0-1620904222795.png

Jay2077_1-1620904331022.png

 

Any help greatly appreciated 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jay2077 , based on what I got a measure like this should do

calculate(sum(Table1[length]), filter(Table1,Table1[song title] = "Abbey Rd"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
HashamNiaz
Solution Sage
Solution Sage

Hi !

You can solve this by proper Data Modelling. 

 

You can create a 1-Many relationship between [Album] & [Songs] table based on [Code] column.

 

Now you can simply, create a measure to calculate sum of lenght like below;

 

Album Lenght = SUM(Song[Lenght])

 

This will simple give you Total Length of Album if you plot a chart against Album.

 

Regards,

Hasham

Thank you

amitchandak
Super User
Super User

@Jay2077 , based on what I got a measure like this should do

calculate(sum(Table1[length]), filter(Table1,Table1[song title] = "Abbey Rd"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Can't get this working 

 

if the top table is called Sheet 1 and the 2nd is called year how would i write your code ?

 

Thank you

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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