Carlos Tellez
Carlos Tellez

Reputation: 157

how to search in lookupvalue filter value?

I want to use lookup value in Power BI, I'm using the following expression:

Type_to_Freq = LOOKUPVALUE(PP_Freq[Estimate],PP_Freq[Type],"Private")

the problem is, I need to pull different values from the table depending the result of one filter in my page.

Can the third field of lookup value could be dynamic?

If one filter I choose "Private", obtain the result for this, and if I choose "Public", change the result of "Private" to "Public".

What do I need to change to use that expression?

Upvotes: 1

Views: 5250

Answers (1)

StelioK
StelioK

Reputation: 1781

Something like this should do the trick:

Measure :=
VAR Selection =
    SELECTEDVALUE ( PP_Freq[Type] )
RETURN
    IF (
        NOT ( ISBLANK ( Selection ) ),
        LOOKUPVALUE ( PP_Freq[Estimate], PP_Freq[Type], Selection ),
        "Make A Slection"
    )

Upvotes: 1

Related Questions