The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |