Forum Discussion

richard-powerbi's avatar
richard-powerbi
Post Patron
6 years ago
Solved

Overwrite data from different fact table when available

How do I create a measure or a table with DAX to get calculated Table 3? And how would I do it if I wanted just the measure for Value of Table 3? Assuming I have common dimensions. So when data ex...
  • AlB's avatar
    AlB
    6 years ago

    richard-powerbi 

    Assuming the field in the visual is the TableX[Id]:

    Measure =
    VAR valT2_ =
        LOOKUPVALUE ( Table2[Value], Table2[Id], SELECTEDVALUE ( TableX[Id] ) )
    RETURN
        IF (
            ISBLANK ( valT2 ),
            LOOKUPVALUE ( Table1[Value], Table1[Id], SELECTEDVALUE ( TableX[Id] ) ),
            valT2_
        )
    

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers