The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
19 | |
18 | |
14 |
User | Count |
---|---|
42 | |
39 | |
24 | |
21 | |
19 |