Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I need a help...
I want to do this expressin dax, but I´m with problems in the days.
Someone help me?
Thank you.
Solved! Go to Solution.
Hi @ROBERTOCMRNO,
Could you post your all table structures with some sample data in this case? Without knowing that we can only guess and offer possible suggestions.![]()
Normally, the DAX expression for Weighted Average should be similar like below.
[Average Med Age Weighted by Pop]= SUMX(Zips, Zips[TTL Pop] * Zips[Med Age]) / [Total Population]
And
WAC = SUMX ( 'Analytics_SourceDat', [Net_Active_Balance] * [INTEREST_RATE] )
/ SUMX ( 'Analytics_SourceDat', [Net_Active_Balance] )In addition, here is a similar thread, and here is a good article about Weighted Averages(DAX) for your reference.
Regards
I'm getting a headache reading that Excel formula . Weighted average is pretty straigtforward in DAX. The basic pattern looks like this ...
Weighted Average = SUM(one number) / SUM(other number)
You would write that as a new measure. This is even better because it deals with the divide by zero.
Weighted Average = DIVIDE( SUM(one number), SUM(other number) )
Hope that helps. The trick is to stop thinking in terms of cells and to start thinking in terms of columns.
Thank you for reply,
I tried this, but does not work...
The result of column MetaDiariaPonderada must be same the column Total.
The value of column MetaDiariaPonderada must be increase by the Column Dia.
Hi @ROBERTOCMRNO,
Could you post your all table structures with some sample data in this case? Without knowing that we can only guess and offer possible suggestions.![]()
Normally, the DAX expression for Weighted Average should be similar like below.
[Average Med Age Weighted by Pop]= SUMX(Zips, Zips[TTL Pop] * Zips[Med Age]) / [Total Population]
And
WAC = SUMX ( 'Analytics_SourceDat', [Net_Active_Balance] * [INTEREST_RATE] )
/ SUMX ( 'Analytics_SourceDat', [Net_Active_Balance] )In addition, here is a similar thread, and here is a good article about Weighted Averages(DAX) for your reference.
Regards
Let me rephrase the original request into something a little different, and see how you would adjust your DAX formula.
I have a table named 'Advertising'
I have a Date column and a Cost column
I'm paying a flat fee of $4,000 for a single month. I want to create a calculated column, Fees, that displays the weighted amount of of that $4,000 for each Date's total Cost.
For example:
(I didn't fill in every cell, but you get the idea. I'm looking for a DAX formula to populate the Fees column.)
| Date | Cost | Fees |
| 4/1/2020 | 100.00 | 13.33 |
| 4/2/2020 | 50.00 | 6.67 |
| 4/3/2020 | 845.00 | 112.67 |
| 4/4/2020 | 321.00 | 42.80 |
| 4/5/2020 | 25.00 | 3.33 |
| 4/6/2020 | ||
| 4/7/2020 | ||
| 4/8/2020 | ||
| 4/9/2020 | ||
| 4/10/2020 | ||
| 4/11/2020 | ||
| 4/12/2020 | ||
| 4/13/2020 | ||
| 4/14/2020 | ||
| 4/15/2020 | ||
| 4/16/2020 | ||
| 4/17/2020 | ||
| 4/18/2020 | ||
| 4/19/2020 | ||
| 4/20/2020 | ||
| 4/21/2020 | ||
| 4/22/2020 | ||
| 4/23/2020 | ||
| 4/24/2020 | ||
| 4/25/2020 | ||
| 4/26/2020 | ||
| 4/27/2020 | ||
| 4/28/2020 | ||
| 4/29/2020 | ||
| 4/30/2020 | ||
| Totals | 30,000.00 | 4000.00 |
Hi,
Fill up with Cost column with numbers. Also, is there a seperate table of the flat fee with a Date column? Share that table (with 2 columns) as well.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!