Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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,
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |