Forum Discussion
Dynamic constant line for scatter plot based on parameter values
- 3 years ago
Hi , xariet
According to your description, you want to add a constant line in your visual and you get an error code .
I test it in my side , when using your dax code , i get the same error in my side .
For this , it seems we can not use the SELECTEDVALUE() function to get the slicers' selection.
You can try to use this dax code and we can meet your need:
choose Value = IF( MAX('Choose measure 2'[Pick measure])="LTV ratio", 40, IF( MAX('Choose measure 2'[Pick measure])="Borrower Debt to Income Ratio", 80, IF( MAX('Choose measure 2'[Pick measure])="Amount Borrowed", 150000, 0 ) ) )Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you Aniya! To push it further, is it possible to include in this calculation a parameter to choose the values instead of fixed values? for example, if I choose the LTV ratio I want to have a choice of values, not just 40 as in the formula?
Hi, xariet
You can try to create a new Table[column] as the value slicer and you can put the column in a slicer and you can replace the MAX(Table[column]) with the 40 value in your dax measure.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly