Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
TomMartens
Super User
Super User

Hey @Anonymous 

 

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
TomMartens
Super User
Super User

Hey @Anonymous 

 

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
Anonymous
Not applicable

Hello @TomMartens , you're absolutely right!

 

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

 

Antonio I.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.