Translating a SQL Query with ROW_NUMBER() - well beyond my current skill-level
I managed to translate a bunch of queries from SQL to DAX, but I just hit a wall with this one. My DAX knowledge is still very limited.
Basically, I am trying to obtain one number (measure). The number of donors whose first donation was made via digital payment methods. My SQL looks like this:
SELECT COUNT(t.donor_id) FROM ( SELECT * FROM ( SELECT ROW_NUMBER() OVER(PARTITION by donor_id ORDER BY date) AS 'RowNumber', donor_id, date, value , c.campaign_id FROM campaigns c ) AS s where s.RowNumber = 1 and s.campaign_id like '%online%' ) AS t
My power BI model has the tables donations (fact table) and campaigns (dim table) among many others,