Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
Could somebody please help me to convert my SQL to DAX below?
Sum(case when DateDiff(month, @ReportPeriodStartDate, TDate) < 0 AND
DateDiff(month, @ReportPeriodStartDate, Isnull(WDate, IsNull(CDate, @ReportDate))) > 0 then 1 else 0 end)
I have
Solved! Go to Solution.
@Anonymous, I doubt your the usage of is blank in place of isnull, From March release power bi supported coalesce , please use that
Please don't just post SQL and ask "how do I do this in DAX?" Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Sample data, expected result.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 10 | |
| 10 | |
| 8 |