Forum Discussion
RafaelRSantos_
4 years agoFrequent Visitor
Sum total previous date filtered
Hi, I need help to create a measure to Sum Total Value before the date specified in slice. I have a stars chema FactAccountingMoviment SkDimDate SkDimAccount CreditValueMoviment DebtValueMovim...
- 4 years ago
I look around documentation and inside forum and i create this result.
PreviousBalance =VAR MinDate = CALCULATE( MIN('Public DimDate'[Date]), ALLSELECTED('Publico DimDate'[Date]) )RETURNCALCULATE(SUMX('Account FactAccountingMoviment','Account FactAccountingMoviment'[CreditValue] - 'Account FactAccountingMoviment'[DebtValue]),FILTER(ALL('Public DimDate'),'Public DimDate'[Date] < MinDate))
RafaelRSantos_
4 years agoFrequent Visitor
I look around documentation and inside forum and i create this result.
PreviousBalance =
VAR MinDate = CALCULATE( MIN('Public DimDate'[Date]), ALLSELECTED('Publico DimDate'[Date]) )
RETURN
CALCULATE(
SUMX('Account FactAccountingMoviment',
'Account FactAccountingMoviment'[CreditValue] - 'Account FactAccountingMoviment'[DebtValue])
,FILTER(ALL('Public DimDate'),'Public DimDate'[Date] < MinDate)
)