Forum Discussion
Using What if parameter + column data in a measure
Hello everyone !
Thank you for all the knowledge you are sharing out there.
I need to develop sort of a Dashboard for my work.
The user need to choose a parameter to increase a price ( % value between 10% / + 50%, what if parameters) and that value shall be multiplicated by a value in my table (to reflect new price).
I am aware i can not use it in column since its static though while doing a measure it seems it returns blank value.
Example What if :
Parameter from -10% to 50%
User Slicer choosen = 5%
Other table ( not related) :
| Random Price | Parameter choosen | New price |
| 100 USD | 5% | 105 USD |
| 120 USD | 5% | 126 USD |
Is there any way to achieve that NEW PRICE column dynamically?
Hi Anonymous ,
If I understand correctly, you want to create a simulator to analyze new prices using slicer.
In this case, if you have a slicer with a selection of values, all you need to do is write a measure that calculates the result based on the selection from the slicer.The SUMX function will allow you to calculate the increase/decrease per dimension. In this case, the dimension is Price, but if it is employee/product, just change it in the code (check the SUMX function).
New Price = SUMX( VALUES('Price'[Price]), 'Price'[Price] + 'Price'[Price] * SELECTEDVALUE('Percent Increase'[Percent Increase])/100)Result:
If I helped, accept the post as a solution and give a kudos. 👍 Thanks!😁
1 Reply
- lkalawskiResident Rockstar
Hi Anonymous ,
If I understand correctly, you want to create a simulator to analyze new prices using slicer.
In this case, if you have a slicer with a selection of values, all you need to do is write a measure that calculates the result based on the selection from the slicer.The SUMX function will allow you to calculate the increase/decrease per dimension. In this case, the dimension is Price, but if it is employee/product, just change it in the code (check the SUMX function).
New Price = SUMX( VALUES('Price'[Price]), 'Price'[Price] + 'Price'[Price] * SELECTEDVALUE('Percent Increase'[Percent Increase])/100)Result:
If I helped, accept the post as a solution and give a kudos. 👍 Thanks!😁