Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

If SELECTEDVALUE returns blank, use default value - can not get AlternateResult to work

Hi PowerBI community!   I am been working on this problem for some time and can not seem to figure it out. Here is the scenario: I have a matrix with total amounts by currencies on it, and I want...
  • AlexisOlson's avatar
    5 years ago

    I'd try defining the default value as a variable. It's easier to debug that way.

    Target (SelectedValue) =
    VAR Default =
        LOOKUPVALUE ( Target[Target], Target[Currency], "Default" )
    RETURN
        IF ( NOT ISEMPTY ( Amount ), SELECTEDVALUE ( Target[Target], Default ) )