+ Reply to Thread
Results 1 to 3 of 3

Power Pivot - What formula to use?

  1. #1
    Registered User
    Join Date
    10-05-2022
    Location
    USA
    MS-Off Ver
    2022
    Posts
    9

    Power Pivot - What formula to use?

    Hello,
    I receive a huge monthly report from my internal system that shows the book value and book yield for the entire portfolio by each position. I want to have a pivot table that shows me my weighted average book yield by each sector and the entire portfolio. The way I normally accomplished this was by adding an extra column (Book Value*Book Yield) to my original data and then doing a calculated field with this formula: 'Book Value*Book Yield' / 'Book Value' which it gave me the weighted average book yield by sector and the entire portfolio. (I've attached the sample file)
    I know there is a way that I can accomplish this by PowerPivot without having to manually add the extra column and doing a calculated field each time but I can't figure out the formula in DAX that gives me the same result. I basically want to Paste my report and refresh the Pivot Tale to get the results. Any ideas?
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Power Pivot - What formula to use?

    Convert your data into a table > Power Pivot > Add to Data Model (I usually bring it into Power Query first since I might have to make transformations in the future, and then close & load to connection only and add to data model)

    Once it is in the data model, you can use this DAX measure:

    Weighted Average Book Yield:=sumx(Table1,Table1[Book Value]*Table1[Book Yield])/sum(Table1[Book Value])

    See attached
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-05-2022
    Location
    USA
    MS-Off Ver
    2022
    Posts
    9

    Re: Power Pivot - What formula to use?

    That's exactly what I was looking for. Thank you so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 08-10-2020, 11:38 AM
  2. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  3. Power-Pivot and Dax Formula
    By Noah101 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2018, 12:30 PM
  4. Power Pivot and Dax Formula
    By mikekhel1987 in forum Excel General
    Replies: 2
    Last Post: 01-21-2017, 12:25 AM
  5. Power Pivot and Dax Formula
    By mikekhel1987 in forum Excel General
    Replies: 1
    Last Post: 01-20-2017, 06:17 AM
  6. Power Pivot and Dax Formula
    By mikekhel1987 in forum Excel General
    Replies: 0
    Last Post: 01-20-2017, 05:32 AM
  7. =If(OR Formula in Power Pivot
    By NeedForExcel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-08-2014, 01:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1