Forum Discussion

CD1's avatar
CD1
Frequent Visitor
8 years ago
Solved

Lookupvalue + Sum column values in different table

Is it possible to do a “lookupvalue” in a measure from a column in a different table specified by a range and to sum that range? Are there other options?




  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi CD1,

     

    Please use calculate with filter functions to instead lookupvalue, I don't think 'lookupvalue' can suitable for your requirement.

     

    For example:

    Sum from other table =
    CALCULATE (
        SUM ( table[value] ),
        FILTER (
            ALL ( table ),
            table[date] >= FIRSTDATE ( table2[date] )
                && table[date] <= LASTDATE ( table2[date] )
        )
    )
    


    Regards,
    Xiaoxin Sheng

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi CD1,

     

    Please use calculate with filter functions to instead lookupvalue, I don't think 'lookupvalue' can suitable for your requirement.

     

    For example:

    Sum from other table =
    CALCULATE (
        SUM ( table[value] ),
        FILTER (
            ALL ( table ),
            table[date] >= FIRSTDATE ( table2[date] )
                && table[date] <= LASTDATE ( table2[date] )
        )
    )
    


    Regards,
    Xiaoxin Sheng

    • dgkallan's avatar
      dgkallan
      Helper II
      Thanks for supplying this. When I'm using this solution, the problem I run into is that it appears to ignore my page filters. Is this a solution other than ALL?
    • PVVBl00's avatar
      PVVBl00
      Helper III

      Hello
      In the event that I want to do the same, but add the values according to some concept, how to do it