Multiply a column from a table with another column from another table for specified year and company

  • Multiply a column from a table with another column from another table for specified year and company

    Posted by DSC Communities on May 29, 2022 at 4:45 pm
    • Mihai Stanca

      Member

      May 29, 2022 at 4:45 PM

      Hello guys

      Please help me
      I have 2 tables, one containing services and another costs
      I want to multiplyĀ  column quantity with Price if the company codes are equal and the year of date = year of Price date.
      Thank you

      TABLE SERVICES COSTS
      Company Service name Date Quantity Company Price date Price
      ADM Service1 10/10/21 100 ADM 1/1/2021 50
      ADB Service2 10/11/21 150 ADB 1/1/2021 60
      ADD Service3 10/12/21 256 ADD 1/1/2021 70
      ADM Service4 10/13/21 456 ADM 1/1/2022 80
      ADB Service5 10/14/21 789 ADB 1/1/2022 90
      ADD Service1 10/10/22 200 ADD 1/1/2022 100
      ADM Service2 10/10/22 250
      ADB Service3 10/10/22 356
      ADD Service4 10/10/22 556
      ADB Service5 10/10/22 678

      ——————————
      Mihai Stanca
      Acasa
      ——————————

    • Dili Timor

      Member

      May 31, 2022 at 2:15 AM

      Hi,
      First you have to make relation between those data table
      1. create table company
      2. create table date
      3. link them to data tables
      then make some measure
      1. total quantity
      2. total price

      after that you can multiply them as you need

      ——————————
      Dili Timor
      12510
      ——————————
      ——————————————-

    • Dili Timor

      Member

      May 31, 2022 at 2:22 AM

      After that you can create matrix with year and company as row and “quantity*price” as column/value

      ——————————
      Dili Timor
      12510
      ——————————
      ——————————————-

    DSC Communities replied 3 years, 10 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Multiply a column from a table with another column from another table for specified year and company’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!