Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |