-1
I have a stock database with four columns: Date - Product - Entries - Sales. 1) The 1st column contains the dates, all of them always with the 1st day of the month and year: 01/01/2010 - 01/02/2010. The dates start 01/01/2010 and go until 01/11/2018. The dates repeat several times in sequence, as we have multiple sales on the same day. 2) The second column contains the names of the products, which of course are repeated many and many times, even on the same day, as there are daily sales. 3) The 3rd column has the entry values in the stock. For each product there are several launches during the months of the years. 4) The 4th column has the outputs of each sale carried out. I need to create a 5th column, or a measure, for each row to return the accumulated value taking into account each product, input and output.
I grouped in Power Query by date as per image. It was better this way. Only the accumulated per line is missing according to each product. As shown below
Paulo, this accumulated would be the difference between input - output?
– Clayton Tosatti
Yes Clayton! Difference between input and output. Each line is input or output. For each date in the dd/mm/yyyy format you can have several rows of the same day, with mainly several outputs on the same day of repeated products, as the purchases are for several companies. The dates in the dd/mm/yyyy format were all transformed on the first day of the month of origin.
– Paulo Semblano
Yes. Several departures in the same day of various products, and with repeated products, because the sales are for several companies.
– Paulo Semblano
Tried using DAX? Something like creating a measure use the formula: (SUM(ENTRIES) - SUM(SALE))
– Clayton Tosatti
I tried, but it doesn’t work.
– Paulo Semblano
If you can change the question by adding the current data (just like you did in the answer you created), and adding another image with the expected result would be easier then
– Clayton Tosatti