Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I want to summarize a table keeping the corresponding values/Dates from a neighbouring column after an expression.
As the example shows I'm hoping to summarize the animals, calculate the earlisest (min) Analysis Date, and keep it's neighbouring FInalise Date.
Appreciate any help.
Thanks
Solved! Go to Solution.
IDEAL_Backtest_Details =
ADDCOLUMNS(
SUMMARIZE(Backtest_Details,
Backtest_Details[Animals],
"Analysis Date", min(Backtest_Details[Analysis Date])
)
, "Final Date",
LOOKUPVALUE(Backtest_Details[Final Date],
Backtest_Details[Animals], [Animals],
Backtest_Details[Analysis Date], [Analysis Date])
)
something like this?
IP: Backtest_Details
OP:
Hi @NMOORE
if you're looking for a calculated table solution, you may try
NewTable =
GENERATE (
VALUES ( 'Table'[Animals] ),
CALCULATETABLE (
TOPN (
1,
SELECTCOLUMNS (
'Table',
"Analysis Date", 'Table'[Analysis Date],
"Finalise Date", 'Table'[Finalise Date]
),
'Table'[Analysis Date], ASC
)
)
)
Thanks alot for this, I was playing around with it for a while trying to do exactly this but just couldnt get there. Much appreciated.
No DAX needs to be harmed for this, You can do this entirely in Power Query. Sort by Analysis Date ascending and then deduplicate by Animals.
Yes, easy in Power Query, already accomplished. The question was for DAX
Hi @NMOORE
if you're looking for a calculated table solution, you may try
NewTable =
GENERATE (
VALUES ( 'Table'[Animals] ),
CALCULATETABLE (
TOPN (
1,
SELECTCOLUMNS (
'Table',
"Analysis Date", 'Table'[Analysis Date],
"Finalise Date", 'Table'[Finalise Date]
),
'Table'[Analysis Date], ASC
)
)
)
Hi, Thanks so much for your reply, I was trying to understand summarize and add columns better as I was half-way there but will look at understanding what you did here next week. Thanks again
IDEAL_Backtest_Details =
ADDCOLUMNS(
SUMMARIZE(Backtest_Details,
Backtest_Details[Animals],
"Analysis Date", min(Backtest_Details[Analysis Date])
)
, "Final Date",
LOOKUPVALUE(Backtest_Details[Final Date],
Backtest_Details[Animals], [Animals],
Backtest_Details[Analysis Date], [Analysis Date])
)
something like this?
IP: Backtest_Details
OP:
Thanks alot for this, I was playing around with it for a while trying to do exactly this but just couldnt get there. Much appreciated.
Please mark my reply as solution if you like it and also helps for the folks in future those who refer this thread.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
21 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |