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
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,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 152 | |
| 130 | |
| 109 | |
| 79 | |
| 54 |