Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Dear friends,
I have data that need to summarize, but at one of its column, I needed to show the last date (maximum date) on the related key row.
The data is something like this :
and the expection is to summarize this ItemId, Quantity, CostAmount, which is the 2 last column is easy (just use SUM), but the TransDate I want to retrieve only the last date when quantity is positive, like this :
I tried like this ->
Invetory = ADDCOLUMNS(
SUMMARIZECOLUMNS('inventory data'[ItemId], "Qty", SUM('inventory data'[Quantity]), "Amount", SUM('inventory data'[Cost amount]) ),
"InflowDate", MAX('inventory data'[TramsDate])
)
But the date is not the date of related ItemId, but the Max date overall, not to mentioned I don't know where to put the condition of the Quantity should be > 0.
Thanks
Solved! Go to Solution.
@admin_xlsior , Try like
Invetory = ADDCOLUMNS(
SUMMARIZECOLUMNS('inventory data'[ItemId], "Qty", SUM('inventory data'[Quantity]), "Amount", SUM('inventory data'[Cost amount]) ),
"InflowDate", MAXX(filter('inventory data', [ItemId] = earlier([ItemId])),[TramsDate])
)
@admin_xlsior , Try like
Invetory = ADDCOLUMNS(
SUMMARIZECOLUMNS('inventory data'[ItemId], "Qty", SUM('inventory data'[Quantity]), "Amount", SUM('inventory data'[Cost amount]) ),
"InflowDate", MAXX(filter('inventory data', [ItemId] = earlier([ItemId])),[TramsDate])
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
52 | |
38 | |
34 |
User | Count |
---|---|
95 | |
69 | |
55 | |
52 | |
46 |