Forum Discussion

eblake's avatar
eblake
Frequent Visitor
10 years ago
Solved

Calculated Field Between Two tabales

I have 2 tables which have the same column headings. One is a snapshot of data taken at the start of the month and one is a snapshot taken at the start of every week.

 

I am looking to have a calculated field that gives the difference between the two tables for one of the columns. I have inserted a screenshot of the table relationships.

 

I am looking to calculate:

'Curr Month Snap FY'[Start of Month Revenue] - 'Curr Week Snap FY'[Start of Week Revenue]

 

Any help would be appreciated.

 

  • Don't think a merge is a good idea here, would create a TON of unnecessary data.

     

    I'd recommend making that as a measure (don't know what table to house it in, doesn't matter much):

     

    Difference = SUM('Curr Month Snap FY'[Start of Month Revenue]) - SUM('Curr Week Snap FY'[Start of Week Revenue])

3 Replies

  • jahida's avatar
    jahida
    Impactful Individual

    Don't think a merge is a good idea here, would create a TON of unnecessary data.

     

    I'd recommend making that as a measure (don't know what table to house it in, doesn't matter much):

     

    Difference = SUM('Curr Month Snap FY'[Start of Month Revenue]) - SUM('Curr Week Snap FY'[Start of Week Revenue])

  • CahabaData's avatar
    CahabaData
    Memorable Member

    As i interpret your post:  In query Editor you would merge the tables to join them, and then make a calculated column.