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
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