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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Looking to convert this SQL query in DAX. Any help is much appreciated.
select phonemodel,CreationDate,sum([Failed])
FROM [DVDB].[dbo].[DailyStatus]
where CreationDate = (select max(CreationDate) FROM [DVDB].[dbo].[DailyStatus])
group by phonemodel,CreationDate
Solved! Go to Solution.
You can write DAX like below:
EVALUATE
VAR MaxDate =
CALCULATE ( MAX ( DailyStatus[CreationDate] ) )
RETURN
FILTER (
SUMMARIZE (
DailyStatus,
DailyStatus[phonemodel],
DailyStatus[CreationDate],
"Total Failed", SUM ( DailyStatus[Failed] )
),
[CreationDate] = MaxDate
)
Please also refer to article below:
https://www.sqlbi.com/articles/from-sql-to-dax-filtering-data/
Regards,
You can write DAX like below:
EVALUATE
VAR MaxDate =
CALCULATE ( MAX ( DailyStatus[CreationDate] ) )
RETURN
FILTER (
SUMMARIZE (
DailyStatus,
DailyStatus[phonemodel],
DailyStatus[CreationDate],
"Total Failed", SUM ( DailyStatus[Failed] )
),
[CreationDate] = MaxDate
)
Please also refer to article below:
https://www.sqlbi.com/articles/from-sql-to-dax-filtering-data/
Regards,
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 51 | |
| 39 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 95 | |
| 78 | |
| 34 | |
| 28 | |
| 25 |