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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all, I am new to Power BI and I need some help with DAX here. I have an existing table like this:
I need to create a new table based on column [CreatedDate], extracting the latest records for each Site. From the example above, the latest record for Site A is from 1/1/2024 and Site B from 11/1/2023, giving us the new table as follows:
In Kusto, we can achieve this easily with arg_max() operator. I wonder anyone can help me compose the DAX query here. It would be much appreciated.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
expected result table =
CALCULATETABLE (
Data,
TREATAS (
GROUPBY (
Data,
Data[Site],
"@maxdate", MAXX ( CURRENTGROUP (), Data[CreatedDate] )
),
Data[Site],
Data[CreatedDate]
)
)
Hi,
Please check the below picture and the attached pbix file.
expected result table =
CALCULATETABLE (
Data,
TREATAS (
GROUPBY (
Data,
Data[Site],
"@maxdate", MAXX ( CURRENTGROUP (), Data[CreatedDate] )
),
Data[Site],
Data[CreatedDate]
)
)