Forum Discussion
CupidC
2 years agoHelper II
Multiplying Row-by-Row in a Table
Hello, I'm seeking assistance on how to perform row-by-row multiplication within a table, (measure or calculated column) similar to the SUMX function, but instead of iterating through each row to sum...
- 2 years ago
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
PRODUCTX function (DAX) - DAX | Microsoft Learn
WINDOW function (DAX) - DAX | Microsoft Learn
expected result measure: = CALCULATE ( PRODUCTX ( Data, Data[Interest Rate] ), WINDOW ( 1, ABS, 0, REL, SUMMARIZE ( ALL ( Data ), Data[Month], Data[Interest Rate] ), ORDERBY ( Data[Month], ASC ) ) ) - 2 years ago
Try the following measure:
Cumulative Rate = PRODUCTX(FILTER(ALL('Table'), 'Table'[Month] <= EARLIER('Table'[Month])), 'Table'[Interest Rate])Assuming that the Month column is unique (or at least, you can find a way to make it so that it's unique by combining it with a year number or you can use some sort of index column instead).
- 2 years agosorry I forgot to add a column 'Table'[Intere Rate]
Ahmedx
2 years agoSuper User
pls try this