The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I am trying to create a DAX mesaure that will show the accumnulated total of a balance sheet line item using th GL data. I have created the following measure that pulls the accumulated balance for the last transaction for that period using the MAX index.
The measure I have is as follows:
Hi @Jenn_Hill_13
Try this: did it free hand, so let me know if you have any issues. Using the Index to go back 1 row.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
BalanceCheck =
VAR _presIndex = 'tGL Combined'[Index]
VAR _prevIndex = 'tGL Combined'[Index] - 1
VAR _presCalc =
CALCULATE (
SUM ( 'tGL Combined'[Balance] ),
FILTER ( 'tGL Combined', 'tGL Combined'[Index] = MAX ( 'tGL Combined'[Index] ) )
)
VAR _prevCalc =
CALCULATE (
SUM ( 'tGL Combined'[Balance] ),
FILTER ( 'tGL Combined', 'tGL Combined'[Index] = prevIndex )
)
RETURN
IF ( _presCalc = 0, _prevCalc, presCalc )
Proud to be a Super User!
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
28 | |
17 | |
11 | |
7 | |
5 |