Forum Discussion

deryansyah's avatar
deryansyah
Frequent Visitor
6 years ago
Solved

Lookup From Measure

Hi   I have 2 files, First file is my Main File, The 2nd is Store Name Files, it looks like this   FILE 1         FILE 2   STORE ID INGREDIENT INGREDIENT TYPE VALUE   STORE ID S...
  • v-xuding-msft's avatar
    v-xuding-msft
    6 years ago

    Hi deryansyah ,

    I change the formula from MAX function to SELECTEDVALUE. Please have a try.

    Measure = 
    var a = ROUND(CALCULATE(AVERAGE('Table'[VALUE]),ALLEXCEPT('Table','Table'[STORE ID])),2)
    var b = SELECTEDVALUE('Table'[STORE ID])
    var c = SELECTEDVALUE('Table 1'[STORE NAME])
    return
    b &" "& c &"   "& a

    Best Regards,

    Xue Ding

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