Forum Discussion
Averagex outcome is not correct using SSAS tabular
Hi , thank you for your support, got a error message for max and min:
Cant use the selectedvalue for ssas tabular:
Hi,yellowold5. Thank you for your reply.
I think there should be a problem with your datasource itself, perhaps the version is too old, resulting in a lot of incompatible functions, the max function can not be passed into the text type or some functions can not be used selectedvalue, for example.
I found a similar issue, but unfortunately the final solution was to rely on max/min instead of selectedvalue.
url:Solved: SELECTEDVALUE() function not recognized - Microsoft Fabric Community
Could you try updating the version of the tabular model you are connecting to. Improve compatibility, as for example the selectedvalue() function is available at newer compatibility levels (1200+).
If your data is deployed at an older compatibility level, this may result in most of the basic functions being unavailable, and in fact this will greatly limit your ability to produce reports, as many of the functions will not work or will not support certain data types.
In fact, this will greatly limit your ability to produce reports, as many of the functions will not work or will not support certain data types (e.g., you are experiencing max/min that does not support text).
Whether you can connect to the AS model via the import mode, as this mode of connection to the tabular model has fewer limitations.
But the most important thing is to check if the version of your data source model itself is too old, please try to update the model version to support more common functions in power bi while ensuring data integrity.
Back to your code problem itself, there is no problem with the code itself, I am using these functions to get the value of each row in the current visual to realize the grouping calculation.
The issue at hand is that your data source does not support most of the functions, which is not conducive to creating reports using this model as very many of the functions are not available.
I wish you luck in finding the problem and look forward to your reply.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.