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
jdballard30
Helper II
Helper II

Trouble Creating (what I think should be a) Simple Measure

I have two tables in my source data (there's more, but those are the pertinent ones), Application and Transactions. An application can have one or many transactions. I have denormalized them into one table, ApplicationTransactions in Power BI. There is a column on the source Application table named EstimatedAmount. Because it's denormalized, EstimatedAmount gets repeated on every row because of multiple matching transaction rows. Here's my data:

 

 

ProgramNameApplicationIDTransactionIdEstimatedAmount
Program1Application1Transaction1125,000.00
Program1Application1Transaction2125,000.00
Program1Application2Transaction3300,000.00
Program1Application3Transaction4152.50
Program1Application3Transaction5152.50
Program1Application3Transaction6152.50
Program1Application3Transaction7152.50
Program1Application4Transaction8279.30
Program1Application5Transaction963,910.22
Program1Application5Transaction1063,910.22
Program2Application6Transaction1117,000.00
Program2Application7Transaction1225,000.00
Program2Application7Transaction1325,000.00

 

I'm trying to create two measures for use in a chart like the one pictured below. The measures I'm trying to create are the Total Estimated Amount per application, and the Average Estimated Amount per application, like this:

 

ProgramNameTotalEstimatedAmountAverageEstimatedAmount
Program1489,342.0297,868.40
Program242,000.0021,000.00

 

I am trying to create the measure for the TotalEstimatedAmount and AverageEstimatedAmount. I know it has to be simple, but I can't figure it out.

 

There is a .pbix file with the above data on OneDrive here.

 

Thanks,

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Try these measures

 

Measure1=SUMX(SUMMARIZE(VALUES(Data[ApplicationID]),[ApplicationID],"ABCD",MIN(Data[EstimatedAmount])),[ABCD])

Measure2=[Measure1]/DISTINCTCOUNT(Data[ApplicationID])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

Try these measures

 

Measure1=SUMX(SUMMARIZE(VALUES(Data[ApplicationID]),[ApplicationID],"ABCD",MIN(Data[EstimatedAmount])),[ABCD])

Measure2=[Measure1]/DISTINCTCOUNT(Data[ApplicationID])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.