This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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,
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 45 | |
| 28 | |
| 24 | |
| 22 |