Forum Discussion
ngocnguyen
4 years agoHelper IV
CALCULATE PREVIOS ROUND
Hi all I have a TABLE 1 as below I build up a Dax formula to calculate the previous round as below, but it not working. Could you pls help to check? Amt_previous round = VAR preroundindex = SE...
- 4 years ago
Hi,
I guess the column [Round] is sorted by [Round index] column.
Please try the below whether it suits your requirement.
Amt_previous round = VAR preroundindex = SELECTEDVALUE ( 'Table 1'[Round index] ) - 1 RETURN CALCULATE ( SUM ( 'Table 1'[Amt] ), FILTER ( ALL ( 'Table 1' ), 'Table 1'[Round index] = preRoundselected ) )
Jihwan_Kim
4 years agoSuper User
Hi,
I guess the column [Round] is sorted by [Round index] column.
Please try the below whether it suits your requirement.
Amt_previous round =
VAR preroundindex =
SELECTEDVALUE ( 'Table 1'[Round index] ) - 1
RETURN
CALCULATE (
SUM ( 'Table 1'[Amt] ),
FILTER ( ALL ( 'Table 1' ), 'Table 1'[Round index] = preRoundselected )
)
ngocnguyen
4 years agoHelper IV
Thanks so much for your support