Forum Discussion
Previous Row Cell multiplied with This Row Cell
- 9 months ago
Hi ilovasen ,
Try the following code:
DFPrev4 = VAR CurrentYear = 'Table'[Year] VAR Restart = 'Table'[EAver] - 'Table'[Year] VAR TableFIlter = FILTER(ALL('Table'), 'Table'[EAver] - 'Table'[Year] = Restart && 'Table'[Year] <= CurrentYear) RETURN PRODUCTX(TableFIlter , 'Table'[DFUnsec] )Has you can see the values are restarting at every 1996:
I just did a couple of lines for each but it works properly.
Basically what I'm doing is to chek the value for the dataset in this case 110000, 120000, 130000 and just filtered out the ones that start with that value.
In concern to the acceped questions you can accept has many has you want.
Hi Olufemi7 & MFelix
Thanks for great contributions. I am really grateful for your help!
Both versions works well in the context it was originally presented. Didn't see Olufemi7 's version at once as it was threaded with an earlier response.
(Can I approve both as solutions or does on disappear if I accept it?)
I have also another challenge though;
This calculation relates to a longer table where
1. each calculation applies for 105 rows (years)
2. a Dataset-column (EAVer) running for all 386 datasets - each with 105 years - numbered from 11 for 105 years, 12 for 105 years to 3870 for 105 years
3. The "New Calculation"/"Column" formula should then have a new starting value in each 1996 (which is taken from the DiscFactorUnsec-column on the "current-row" and therefore not recursive)
4. Is there a simple amendment to the Formula that can facilitate this?
Continued table
This is the correct table