Forum Discussion
Query Exceeded Available Resource
- 7 months ago
Hi rehansaeed2468 ,
Create the helper table first:
IndexTable =
DISTINCT (
SELECTCOLUMNS (
'Table B',
"RowIndex", 'Table B'[Row Index_TableB]))
Now create the DecayFactor column inside IndexTable (not Table B):DecayFactor =
POWER ( 0.964783, IndexTable[RowIndex] )
This will work because of no circular dependency.
Final Measure =
VAR CurrentIndex =
SELECTEDVALUE ( 'Table B'[Row Index_TableB column] )RETURN
IF (
ISBLANK ( CurrentIndex ),
BLANK (),
SUMX (
FILTER (
IndexTable,
IndexTable[RowIndex] <= CurrentIndex
),
IndexTable[DecayFactor]
* CALCULATE (
SUM ( 'Table B'[Product Cost] ),
'Table B'[Row Index_TableB] = IndexTable[RowIndex]
)))
Hope this helps.
Chaithra E
Hi rehansaeed2468 ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.