Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a matrix in powerbi with 3 measures that are calculated as a weighted average. The total column is showing the average of the columns displayed but I want it to display the last value instead. Any idea how can I do that?
The formula I am using to calculate the KPI is:
Something like this
q1 | q2 | q3 | q4 | Total now | Total desired | |
KPI 1 | 5 | 8 | 9 | 10 | 8 | 10 |
KPI 2 | 6 | 1 | 9 | 3 | 4.75 | 3 |
KPI 3 | 6 | 4 | 6 | 2 | 4.5 | 2 |
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
Let’s assume that your metric is called value
Value = SUMX(
table1,
table1[Average]*table1[weight])/
SUM(table1[weight])
You create the following measure using ISINSCOPE.
Final Value = IF(ISINSCOPE('table1'[q]),[Value],CALCULATE([Value],FILTER('table1',[q]="q4")))
Attached is the sample I created, there may be some discrepancies, you can refer to it.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Let’s assume that your metric is called value
Value = SUMX(
table1,
table1[Average]*table1[weight])/
SUM(table1[weight])
You create the following measure using ISINSCOPE.
Final Value = IF(ISINSCOPE('table1'[q]),[Value],CALCULATE([Value],FILTER('table1',[q]="q4")))
Attached is the sample I created, there may be some discrepancies, you can refer to it.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous
Thank you so much, it worked exactly as I wanted it.
@Anonymous You can try something like this.
In this solution, you will need a date table.
Var TableWeight = SUM ( Table1[Weight] )
RETURN
CALCULATE (
DIVIDE ( Table1[Average] * Table1[Weight], TableWeight ),
LASTDATE( 'Date'[Date] )
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |