I have an interesting challenge in that I need to determine the %yield of a product where the consumption of the product occurs over many months.
The objective is to display in the visuals the yield% in the last month of consumption, below I have 2 images that may help.
In image 1, below the last date of consumption was 5/11/21, how can i calculate the yield and then to display in the visuals in the month of May for FY21 (yield = 810.63 / 883.33)
I think this is going to be a relatively easy task for PQ, based on the same type of allrows grouping and identification of the max date by group technique we used in the last solution we worked on together. I think this video will be very helpful to you:
However, in the example above, can you please explain in a bit more detail how the 810.63 andd the 883.33 figures are derived?
The 810.63 is the sum of the yield quantity column, for order # 1295624 and operation number 110.
The 883.33 is the quantity that was issued to the order. I only need a single occurrence of the issued quantity to determine the yield, thus 810.63 / 883.33 = 91.76%
Great - glad to hear that worked well for you. Once you get in the habit of using the Group By/All Rows pattern, you’ll find that you begin to see applications for it absolutely everywhere. That pattern alone has dramatically reduced the amount of DAX I write.