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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I'm trying to create a dynamic weighted sum of different attributies of categories to get a total using user-adjustable parameters.
My component table looks something like this:
| Categories | Value1 | Value2 |
| Cat1 | 0.3 | 0.4 |
| Cat2 | 0.1 | 0.7 |
| Cat3 | 0.6 | 0.3 |
Then I have two what-if parameters, Parameter1 and Parameter2.
I want to create a measure that allows me to get Value1*Parameter1+Value2*Parameter2 for each category.
I tried to use a calculated column, but apparently calculated columns don't work with what-if parameters. Is there a way to create a measure that looks like this?
| Categories | Output |
| Cat1 | 0.3*Parameter1+0.4*Parameter2 |
| Cat2 | 0.1*Parameter1+0.7*Parameter2 |
| Cat3 | 0.6*Parameter1+0.3*Parameter2 |
Solved! Go to Solution.
@lizzy
You can try this meaure:
Output
= IF (
HASONEVALUE ( table[Categories] ),
SUM ( table[value1] ) * SELECTEDVALUE ( 'Parameter1'[value] )
+ SUM ( table[value2] ) * SELECTEDVALUE ( 'Parameter2'[value] )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@lizzy
You can try this meaure:
Output
= IF (
HASONEVALUE ( table[Categories] ),
SUM ( table[value1] ) * SELECTEDVALUE ( 'Parameter1'[value] )
+ SUM ( table[value2] ) * SELECTEDVALUE ( 'Parameter2'[value] )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Perfect, thank you!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 107 | |
| 39 | |
| 33 | |
| 25 |