Forum Discussion
SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples
- 1 year ago
I don't think that there will be any way to get this working with small multiples. If you look at the DAX queries generated for the visual, when the measure for the constant line is evaluated it is done in an evaluation context which does not include the column you use to separate the small multiples, so because it is not being filtered at all there is no way to determine which multiple you are currently in.
My guess is that this is by design for performance reasons. As it is a constant line then the categories should have no impact on its value, and it is only calculated once for the entire visual, rather than having to be calculated multiple times when it should produce the same value.
Hi j_ocean ,
Based on the description, try using ISFILTERED function to check if the column is being filtered.
VAR x = IF( ISFILTERED(table[col]), SELECTEDVALUE(table[col], "Default"), "Default" ) RETURN
If the function doesn't work, perhaps multiple separate views need to be made.
You can also view the following document to learn more information.
ISFILTERED function (DAX) - DAX | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This did not change the behavior of the line but I appreciate the attempt.