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
I want to create a measure to find the sum of the below between the latest date and the earliest date.
I have a column for the date in the table
measure= qty * price
Hello @Anonymous,
You can use the following DAX formula:
TotalAmount =
CALCULATE(
SUMX(
TableName,
TableName[qty] * TableName[price]
),
FILTER(
TableName,
TableName[date] = MAX(TableName[date])
|| TableName[date] = MIN(TableName[date])
)
)Should you require further details or assistance please do not hesitate to reach out to me.
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!