Power BI - FILTER CUMULATIVE VALUE WITH SEVERAL CRITERIA

Asked

Viewed 4,320 times

-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

inserir a descrição da imagem aqui

  • Paulo, this accumulated would be the difference between input - output?

  • 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.

  • Yes. Several departures in the same day of various products, and with repeated products, because the sales are for several companies.

  • Tried using DAX? Something like creating a measure use the formula: (SUM(ENTRIES) - SUM(SALE))

  • I tried, but it doesn’t work.

  • 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

Show 1 more comment

1 answer

0

I grouped in Power Query by date as image. It’s better this way. Only the accumulated per line is missing according to each product.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.