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.
Hello everyone,
I am trying to use a weighting measure inside a SUMX function and at each iteration of the SUMX, the weight becomes 100% because it is recalculating the weight for the specific row instead of doing it for the few items that are selected.
I managed to get close to the answer as I have the dynamic weight working when I put it in a table ans select countries with my slicer, but as soon as I put the measure Dynamic Weight in
Here is the code of the measures :
SUMX Dynamic Weight * KPIS =
Dynamic Weight =
CALCULATE(
Solved! Go to Solution.
try this
SUMX Dynamic Weight * KPIS =SUMX(ALLSELECTED(Mapping[Country]),'KPIs'[KPI]*'Table'[Dynamic Weight])
@Standef
Please try
SUMX Dynamic Weight * KPIS =
CALCULATE (
SUMX (
'KPIs',
'KPIs'[KPI] * CALCULATE ( [Dynamic Weight], ALL ( Mapping[Country] ) )
),
ALLSELECTED ( Mapping[Country] )
)
Hey @tamerj1, thanks for the reply!
Jjust tried that and unfortunately it givesthe same output as before...
try this
SUMX Dynamic Weight * KPIS =SUMX(ALLSELECTED(Mapping[Country]),'KPIs'[KPI]*'Table'[Dynamic Weight])
Hello @wdx223_Daniel
Amazing, this works exactly like I need it to.
Thank you very much!
Have a nice weekend!
Stan
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |