Forum Discussion
JPrince_22
6 years agoHelper I
Cumulative sum using filtered dates
Hi all i have a series of Graphs in Power BI which reference two different amount fields, and two date fields. There is an active relationship on one and the measure works fine, however when tryi...
- 6 years ago
Try one of the two.
Deposits Received = var MaxAcc = MAXX('Servicing Accounts',[account_funded_date]) Return calculate(sum([ledger_balance]),('Servicing accounts'),'Servicing accounts'[account_funded_date] <=MaxAcc, userelationship('Servicing accounts'[account_funded_date],DateTable[Date])) Deposits Received = calculate(sum([ledger_balance]), userelationship('Servicing accounts'[account_funded_date],DateTable[Date]))Can you share sample data and sample output.
JPrince_22
6 years agoHelper I
Sorry I don't follow, how to I need to edit the measure to solve this?
amitchandak
6 years agoSuper User
JPrince_22 , can mark the user @ for whom this question is. In case you are looking at what I posted you have to Change Max to MAXX in var in the formula
- JPrince_226 years agoHelper I
Hi amitchandak
I have edited this as suggested, but still not working. It now reads:
Deposits Received = var MaxAcc = MAXX('Servicing Accounts',[account_funded_date]) Return calculate(sum([ledger_balance]),allselected('Servicing accounts'),'Servicing accounts'[account_funded_date] <=MaxAcc, userelationship('Servicing accounts'[account_funded_date],DateTable[Date]))- amitchandak6 years agoSuper User
Try one of the two.
Deposits Received = var MaxAcc = MAXX('Servicing Accounts',[account_funded_date]) Return calculate(sum([ledger_balance]),('Servicing accounts'),'Servicing accounts'[account_funded_date] <=MaxAcc, userelationship('Servicing accounts'[account_funded_date],DateTable[Date])) Deposits Received = calculate(sum([ledger_balance]), userelationship('Servicing accounts'[account_funded_date],DateTable[Date]))Can you share sample data and sample output.
- JPrince_226 years agoHelper I