Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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]
)
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 12 | |
| 11 | |
| 10 |