Forum Discussion
Dynamically select column based on slicer for regression/correlation calculation
Hi tamerj1,
Great solution that you provided.
Also I need some suggesions. I am explaining what I did.
I used header as x-axis & y-axis. Then created measures using SWITCH DAX for column selection at both axis. Now, Simply I used craydec regression chart which is working fine, showing equation perfect but in pictorial view. So that finally we have to use LINEST/LINESTX dax.
So, can we create LINEST/LINESTX DAX using measures, otherway what you did.
Anonymous
Yes probably you can but
1. I cannot 100% confirm without having the sample file. You share a download link of it.
2. Not sure if having a switch statement of 400 columns is practical. What happens if you add or delete columns? The code would break.
- Anonymous2 years agoNot applicable
Hi tamerj1 ,
One more small thing needs to know, is it option in field parameterto to modify/add more field in case of addition more field in data base. Also can we select all column of table at a time or have to select one by one.- tamerj12 years ago
Community Champion
Anonymous
That needs to be done manually with field parameters. The advantage of field parameters is that they are simple to create and and are aboe to dynamicaly change the tye display name as per the selected column or measure. However, I believe other solution that utilizes DAX to create something similar to a parameter table could be possible but way more complicated.