cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Inserting a value dinamically into a column

Hello everyone

I'm novice in PBI and I'm having the following issue:

 

I have a measure called Difference (whole number) and I'd like to know if it's possible to multiply it by a measure called EnergyConsumption (whole number). The thing is that EnergyConsuption is not a fixed value, it should be possible to change it in a user-friendly way (filtering, MsgBox, Etc).

 

The result should be a measure or calculated column called Savings with the result of the product Difference*EnergyConsumption.

 

Thank you for your help.

 

Antonio I.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Inserting a value dinamically into a column

Hey @Antoniozarzal 

 

what you are looking for can be achieved with "What If" parameters, this article describes this in much greater detail: https://docs.microsoft.com/en-us/power-bi/desktop-what-if

Basically, a parameter (the available values) is represented by a table, the user can select one value using a slicer, the selected value can be picked up by using the DAX function SELECTEDVALUE, and used inside a DAX measure.

 

Hopefully this provides what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: Inserting a value dinamically into a column

Hey @Antoniozarzal 

 

what you are looking for can be achieved with "What If" parameters, this article describes this in much greater detail: https://docs.microsoft.com/en-us/power-bi/desktop-what-if

Basically, a parameter (the available values) is represented by a table, the user can select one value using a slicer, the selected value can be picked up by using the DAX function SELECTEDVALUE, and used inside a DAX measure.

 

Hopefully this provides what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

Highlighted
New Member

Re: Inserting a value dinamically into a column

Hello @TomMartens , you're absolutely right!

 

This is what I was looking for. Thank you so much.

 

Antonio I.

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors