Forum Discussion

RonaldvdH's avatar
RonaldvdH
Post Patron
6 years ago
Solved

Is this possible ?

Hey guys, i need your help in this one

 

I have a table and i need a sort of lookupvalue formula based on 2 variabels (column 1 and 2) in table A and then search in table B and sums up the values based on these 2 variables

I already have a summarized table based on project name and week but how do i calculate the 'value' ?

 

Table A

Project

WeekValue

A

2020-02summarizes based on Project A ánd 2020-02
A2020-03summarizes based on Project A ánd 2020-03
B2020-02summarizes based on Project B ánd 2020-02
A2020-04summarizes based on Project A ánd 2020-04

 

Table B

ProjectWeekValue
A2020-02100
A2020-02100
A2020-02200
B2020-03200
B2020-04200
A2020-03150

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi RonaldvdH ,

     

    Try this.

     

    Create a calculated column in TableA

     

    Value =
                          Calculate (SUM(TableB[Value]),
                                     FILTER(TableB,
                                            TableB[Project]=TableA[Project] &&
                                             TableB[Week] = TableA[Week] ) )
     
    Cheers
     
    CheenuSing

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RonaldvdH ,

     

    Try this.

     

    Create a calculated column in TableA

     

    Value =
                          Calculate (SUM(TableB[Value]),
                                     FILTER(TableB,
                                            TableB[Project]=TableA[Project] &&
                                             TableB[Week] = TableA[Week] ) )
     
    Cheers
     
    CheenuSing
  • Hi RonaldvdH ,

     

    Have you got any relationship between these 2 tables?

    If no, can you create a relationship between 2 tables on column "Project Name".

     

    On the report, create a TABLE VISUAL, move "ProjectName" and "Week"  columns from TAble A and "Value" column from Table B with summarisation as SUM.

     

    Please give kudos if this is helpful or Mark it as a Solution if this works! 🙂

     

    Thanks,

    Pragati

    • RonaldvdH's avatar
      RonaldvdH
      Post Patron

      Pragati11 unfortunately that is not possible because one of the 2 columns must have unique values