Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi!
I'm traying to retrieving the last date from item ledger entry with this DAX measure.
The relation in the model (and why I'm using the CROSSFILTER)
Solved! Go to Solution.
Hi @AndreaCBS ,
I create two tables as you mentioned and make a relationship between them.
Then I think you can use this DAX code.
Measure =
VAR MD = MAX('Inventory Transactions'[D_Date_SID])
RETURN
CALCULATE(
FORMAT(
DATE(
LEFT(MD, 4),
MID(MD, 5, 2),
RIGHT(MD, 2)
),
"yyyy/mm/dd"
),
'Inventory Transaction Type'[Inventory Transaction Type Code] = 0,
CROSSFILTER(
'Inventory Transaction Type'[D_Enum_InventoryTransactionType_SID],
'Inventory Transactions'[D_Enum_InventoryTransactionType_SID],
BOTH
)
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AndreaCBS ,
I create two tables as you mentioned and make a relationship between them.
Then I think you can use this DAX code.
Measure =
VAR MD = MAX('Inventory Transactions'[D_Date_SID])
RETURN
CALCULATE(
FORMAT(
DATE(
LEFT(MD, 4),
MID(MD, 5, 2),
RIGHT(MD, 2)
),
"yyyy/mm/dd"
),
'Inventory Transaction Type'[Inventory Transaction Type Code] = 0,
CROSSFILTER(
'Inventory Transaction Type'[D_Enum_InventoryTransactionType_SID],
'Inventory Transactions'[D_Enum_InventoryTransactionType_SID],
BOTH
)
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @AndreaCBS ,
try like:
Data Ultima Vendita =
CALCULATE(
VAR MD = MAX('Inventory Transactions'[D_Date_SID])
RETURN
FORMAT(
DATE(
LEFT(MD, 4),
MID(MD, 5, 2),
RIGHT(MD, 2)
),
"yyyy/mm/dd"
),
'Inventory Transaction Type'[Inventory Transaction Type Code] = 0,
CROSSFILTER(
'Inventory Transaction Type'[D_Enum_InventoryTransactionType_SID],
'Inventory Transactions'[D_Enum_InventoryTransactionType_SID],
BOTH
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |