+ Reply to Thread
Results 1 to 1 of 1

How do I create a Weighted Average in DAX

  1. #1
    Registered User
    Join Date
    06-22-2020
    Location
    NY, NY
    MS-Off Ver
    Windows 10
    Posts
    14

    How do I create a Weighted Average in DAX

    Greetings, and lets see if I can do this correctly with the graphics.


    The DAX code which is a typical (as they say) weighted average template follows this text.

    The table that contains the columns; [PRV] & [PRI QTY] to be multiplied and produce the product [Asset Value], follow the DAX code.

    At each row, I want to divide the [Asset Value] by the Sum of the [PRI QTY], not the individual values at the roes themselves.

    As you can see from the column [WAvg], I am getting the same result as [PRV]; why, because I am not retaining the "TotalGSF" from the VAR in the DAX code.

    I thought by using the VAR, the "TotalGSF" would be retained as a constant for the DIVIDE function, but not true, its obvious the row value of [PRI QTY] is being used.

    How do I retain the "TotalGSG" for use in the DIVIDE function?

    Thank you.
    Attached Files Attached Files

+ 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. How do I create a Weighted Average in DAX
    By Romela in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2021, 12:11 PM
  2. Replies: 4
    Last Post: 07-19-2019, 04:47 PM
  3. Weighted Average Function for Series Weighted by Increments of 1
    By kratsexcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2018, 11:38 AM
  4. Replies: 0
    Last Post: 02-15-2018, 03:04 AM
  5. Query regarding Calculating Weighted average value or average value in Percentage.
    By adamsmith1337 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-03-2016, 07:56 AM
  6. [SOLVED] Average Percentage (weighted average) but I want to exclude N/A
    By mespinoza in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-28-2015, 02:53 PM
  7. [SOLVED] What is this kind of average called?-weighted average
    By havocdragon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-24-2005, 01:05 PM

Tags for this Thread

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