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
Jkaelin
Resolver I
Resolver I

Calculate product by year

Good morning,

 

Overall, I am seeking to produce a measure that can calculate the product by year.  All my current attempts have failed.  An overview is this:  I have a column of data in which I calculate the top 20% & bottom 20% via a percentile measure.  I then calculate the spread between those two.  The spread is summarized monthly.  

 

My hope is to take the spread results that are summarized by month & calculate the results on a yearly basis via "product", not sum or average, etc.  

 

My spread measure summarized for each month is this:

P/E Tk minus Bk:=IF (1 + ( ( [P/E Percentile Top k] - [P/E Percentile Bottom k] )
/ 100 ) 
= 1,
BLANK (),
1 + ( ( [P/E Percentile Top k] - [P/E Percentile Bottom k] )
/ 100 )
)

 

A snap shot of the summarized results are below.  I want similar results, but by year & the monthly results shown in the image to be multiplied together.  Spread Measure.PNGAny suggestions or ideas?  Kindly & Thank you!  James

 

2 REPLIES 2
Phil_Seamark
Employee
Employee

Hi @Jkaelin

 

Based on your sample data, can you please provide what the expected outcome should look like?

 

Feel free to mock up in Excel or similar to help clarify what you are after. 🙂


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark

 

Hey Phil!  Below is a sample data & expected outcome.  The expected outcome is highlighted in yellow.  

 

  • The yellow formula is (like in Excel) =Product(IF(Year(Row Labels=2006),Column B)).  
  • It's the 2006 data, multiplied together.  
  • Also, 1.0165 = (1.02 X 1.00 X 0.98 X 1.01)
  • Quick Note:  Column B is not a column of regular data or a calculated column, it's the pivot table result of measures.  

 

 Spread Measue_1.PNG

 

I was hoping a calculated(productx(...)) would work, but to no avail.  I've tried summarize & other alternatives.  I'm just not that good in DAX yet.  Any help would be much appreciated.

 

Thank you & kindly,

James

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.