Forum Discussion

Elzzie's avatar
Elzzie
Frequent Visitor
2 years ago
Solved

Check column from another table if it contains two values, and return a different string as result

Hi community, I'm quite new to powerbi, and have a specific usecase I cannot figure out. I hope you can help me out here.  I have the following two tables: Event EventID EventName 1 ...
  • Greg_Deckler's avatar
    2 years ago

    Elzzie PBIX is attached below signature.

    GuestLocation = 
        VAR __Table = SUMMARIZE( RELATEDTABLE(Guest), [GuestLocation] )
        VAR __Rows = COUNTROWS( __Table )
        VAR __Result = 
            IF( 
                __Rows = 1,
                MAXX( __Table, [GuestLocation] ),
                "Multiple (" & __Rows & ")"
            )
    RETURN
        __Result