Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I created a numeric parameter that allows the user to choose a value between 0 and 20.
And a measure that tells me what number was chosen:
I have a table Product and I want to add a column that gives me the new price.
The column New Price should mantain the price for products B and C, and attribute a new price for product A that correspondes to the current price in table Product multiplied by the 'ChosenNumber'.
This is the result:
As you can see, for product A the new price is blank.
Assuming that this was the user input:
The expected output was:
Hey @D_P
Instead of creating a calculated column, create a measure using the below code
New Price =
IF(
SELECTEDVALUE(TableA[Name]) = "A",
CALCULATE(Parameter[Parameter Value] * SELECTEDVALUE(TableA[Price])),
MAX(TableA[Price])
)
You will get the following output
If this helps you then please give it a kudo and mark my solution as accepted so that other can find it quickly on facing similar issue. Thank You!
Hi PowerBI wizard @Dhairya!
Thank you for the solution provided.
But on this specific case I really need it to be a calculated column.
Any other cards on your sleeve?
I don't think you can use a Measure in this type of Column calculation. If you swap out [ChosenNumber] for a literal value, it will show proper results, right?
Proud to be a Super User! | |
Yes, you're right. But I need it to be dinamic, meaning, I need to be able to change it here
And see it reflected on the Product table.
Do you have any other suggestions on how this can be achieved?
Thanks in advance.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |