Forum Discussion

diederd's avatar
diederd
Helper II
6 years ago
Solved

Using LookUpValue in a measure (including switch)

Hello PBI Community.   I've recently come across an issue and I'm hoping the following is possible. Whilst I have two tables; related by means of the <identifier> column - the idea is that I'm wish...
  • Icey's avatar
    6 years ago

    Hi diederd ,

     

    There are duplicate rows in your EPP table. So, lookupvalue() will return multiple values in a cell. This is not allowed.

    Try this:

    versionInstalled =
    SWITCH (
        SELECTEDVALUE ( tblSoftware[packageName] ),
        "EPP", CALCULATE (
            FIRSTNONBLANK ( EPP[Application Version], 1 ),    -----------return the first not blank value
            FILTER (
                ALLSELECTED ( EPP ),
                EPP[Identifier] = MAX ( 'Active Devices'[Identifier] )
            )
        )
    )
    

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.