Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn 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 |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |