This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi everybody, i'm trying to convert a SQL query that looks like this to DAX but without a success:
CASE WHEN [T.Time_Week] > DATEADD(WEEK, DATEDIFF(WEEK, 0, GETDATE()) - 1, 0) THEN '3: Current week and forward'
WHEN [T.Time_Week] >= DATEADD(WEEK, DATEDIFF(WEEK, 0, GETDATE()) - 10, 0) THEN '2: Last 10 Weeks'
ELSE '1: Before Last 10 Weeks' END AS Time_Window
Can you help me with this please ?
Many thanks
well the main question is how to convert into DAX the SQL "CASE WHEN" query, and then this part of the query also is not clear to me: DATEADD(WEEK, DATEDIFF(WEEK, 0, GETDATE()) - 10, 0) THEN '2: Last 10 Weeks'
What specific piece are you having trouble with? Can you supply sample data?
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 65 | |
| 43 | |
| 28 | |
| 22 | |
| 22 |