previous row
3 TopicsCumulative Calculation Multiplying Values from Previous Row
Hello, I need to create a cumulative measure that references the previous rows values like this: Where refPeriod comes from the dim table Periods, allItemsByItem comes from the fact table I_data and value comes from another fact table W_data. The relationships between tables are as follows: Periods[refPeriod] = I_data[refPeriod] 1 to many single direction Periods[basketYear] = W_data[basketYear] many to many bi-directional There is no relationship between I_data and W_data Slicers for product, geography, start refPeriod and end refPeriod are used to bring the results into a table visual. I can identify the first selected reference period with if(min('Periods'[refPeriod]) = selStartDate, value..... where selStartDate is a measure that captures the value from one of my date slicers. The problem is how to figure out the calculation after the first row. First row logic: = value from the same row. All other row logic: = the result of the measure in the previous row multiplied by the allItemsByItem in the previous row. Any suggestions would be greatly appreciated. And I can provide more information if it's needed.Solved3.8KViews0likes4CommentsDax to crack scenario - previous row and apply results in same row
Hi All, We have a scenario where we need to loop the calculation in same column. Following is the sample data: A B C 1 2 3 5 6 2 Result 9 3 8 Result 1 3 6 Result 4 5 5 Result The column C will have only first row filled and here its 3. The below rows for column C is as follows: Value of Previour row in Column C +Current row of Column A - Current row of Column B ie to get 2nd row = 3+5-6 = 2 to get 3rd row = 2+9-3 = 8 to get 4th row =8+1 -3 =6 to get 5th row = 6+4-5 = 5 Kindly advice me to crack this. Thanks in advance.Solved1.5KViews0likes6CommentsUse previous row in current column calculation
Hello, trying to create a calculated column using data from the previous row. See example below for situation which has been calculated in excel for Indexation Factor. Indexation factor formula = B2*(1+A3) Within excel row B1 is manually set to 1 and the fields below are using the calculation above. Can this be replicated using a calculated column within PowerBI? Thanks in advance. (A) Selected Index (B) Indexation Factor 1 0.029683 1.029683334 0.004578 1.03439749 0.049629 1.08573384 0.047982 1.137829244 0.030898 1.172985656 0.028848 1.206823699 0.019598 1.230475107 0.010779 1.24373867 0.021425 1.270385647 0.037423 1.31792673 0.030566 1.358210528 0.025874 1.393353256 0.012128 1.410252314 0.057762 1.491711364 0.123262 1.675582498 0.043063 1.747738101Solved905Views0likes3Comments