March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have this DAX:
Solved! Go to Solution.
@KW123 Missed a )
Column =
VAR _customer = [AccountNbr]
VAR _date = [DisbDate]
VAR _year = YEAR(_date)
VAR _month = MONTH(_date)
VAR _table =
FILTER(
Disb,
Disb[AccountNbr] = _customer && Disb[DisbDate] < _date && YEAR([DisbDate]) = _year && MONTH([DisbDate]) = _month
)
VAR _lastdate =
MAXX( _table, Disb[DisbDate])
VAR _lasttransaction =
MAXX(
FILTER(
_table,
Disb[DisbDate]=_lastdate
),
Disb[Disbamt]
)
RETURN
[DisbAmt] - _lasttransaction
@KW123 Maybe:
Column =
VAR _customer = [AccountNbr]
VAR _date = [DisbDate]
VAR _year = YEAR(_date)
VAR _month = MONTH(_date)
VAR _table =
FILTER(
Disb,
Disb[AccountNbr] = _customer && Disb[DisbDate] < _date && YEAR([DisbDate]) = _year && MONTH([DisbDate] = _month
)
VAR _lastdate =
MAXX( _table, Disb[DisbDate])
VAR _lasttransaction =
MAXX(
FILTER(
_table,
Disb[DisbDate]=_lastdate
),
Disb[Disbamt]
)
RETURN
[DisbAmt] - _lasttransaction
@Greg_Deckler
Thank you so much for your reply!!
This is what I get if I copy and paste...
@KW123 Missed a )
Column =
VAR _customer = [AccountNbr]
VAR _date = [DisbDate]
VAR _year = YEAR(_date)
VAR _month = MONTH(_date)
VAR _table =
FILTER(
Disb,
Disb[AccountNbr] = _customer && Disb[DisbDate] < _date && YEAR([DisbDate]) = _year && MONTH([DisbDate]) = _month
)
VAR _lastdate =
MAXX( _table, Disb[DisbDate])
VAR _lasttransaction =
MAXX(
FILTER(
_table,
Disb[DisbDate]=_lastdate
),
Disb[Disbamt]
)
RETURN
[DisbAmt] - _lasttransaction
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
17 | |
16 | |
7 | |
5 |
User | Count |
---|---|
29 | |
28 | |
20 | |
13 | |
12 |