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.
Hi, I have a table with expected return of each assets and corresponding volatility as below.
I created some measures with What-if parameters. What-if parameters will let users choose what volatility rate they want and my measures will return the corresponding expected returns.
My problem is my measures work very well for volatility rate : 2,9% -> 3.5%. But from 3.6% they don't generate any result. I don't know what I did wrong here.
This is my What-if parameter:
here is an example of my measure:
Hi @Anonymous
the way you are using the 'What if'-parameter could/should be replaced with a slicer on your Summary[Volatility]-column. The 'What if'-parameter is meant to be used for calculating changes in a measure based on user input, e.g. what would the total sales be if this discount rate were used. You are using it for a kind of lookup, which should be handled by a normal slicer instead. Then your measure would just be
Expected_return =sum(summary[Expected return])
or possibly like this, if you don't want to show the value unless a slicer value has been chosen
Expected_return =if(hasonevalue([Expected return]);sum(summary[Expected return]);blank())
However, I created a little sample file based on your screenshot, and had the exact same experience. There seems to be something happening to the value created by be 'what if'-parameter which makes just little bit different than the value in your summary table.
Using the round-functions fixed this, so if you want to still use your 'What if'-parameter, you can write is like this
expected return = CALCULATE ( MAX ( Summary[Expected return] ), FILTER ( Summary, Summary[Volatility_rounding] = ROUND ( Volatility[Volatility Value], 4 ) ) )
You should drop the formatting part of the measure, use the formatting options in the modelling ribbon instead. Also, as there are no other filters working on your table, there is no need to include the ALL-functions.
Cheers,
S
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |