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'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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |