Forum Discussion

grggmrtn's avatar
grggmrtn
Icon for Post Patron rankPost Patron
6 years ago
Solved

DAX - if/then giving error about integer values, when there are none?

I'm working in three tables: The fact table, and two dimensions.   In the fact table I need to make a calculated column based on values (text) from columns in the two dimensions. Shouldn't be a pro...
  • Mariusz's avatar
    6 years ago

    Hello @grggmrtn

    Try this.

    Frekvens Filter = 
    VAR __isWeek = RELATED( 'nexus2 Dim_Frekvens'[Hver x] ) = "WEEK"
    VAR __isIn = RELATED( 'nexus2 Dim_Indsats'[Indsats navn] ) IN { "R1 - Rengøring*",  "VP - Tøjvask*" }
    RETURN 
    IF (
        __isWeek && __isIn;
        "OK";
        "NOT OK"
    )

    Best regards
    Mariusz

    If this post helps,then please consider accepting it as the solution.

    Please feel free to connect with me.
    Linkedin