Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I need small help in writing DAX for below situation.
table_A
id date stagetype statustype
1042268 2020-01-27 1 1
1042268 2020-01-27 3 2
1041658 2020-01-27 2 2
1017296 2020-01-27 3 15
1042269 2020-01-27 1 1
1042270 2020-01-27 1 1
1041053 2020-01-27 3 2
1030893 2020-01-27 2 2
1030893 2020-01-27 3 2
1042271 2020-01-28 1 1
The SQL query is
select Count(DISTINCT R.id) AS 'ID'
FROM table_A R WITH(nolock)
INNER JOIN (SELECT DISTINCT SS.id,
Min(SS.date) AS MinDate
FROM table_A SS WITH(nolock)
WHERE SS.id IN (SELECT SSS.id
FROM table_A SSS WITH(nolock)
WHERE SSS.stagetype = 5
AND SSS.statustype = 4)
AND SS.statustype = 13
AND SS.stagetype = 5
GROUP BY SS.id) AS MinDate
ON R.id = MinDate.id
AND MinDate.mindate = R.date
WHERE R.id IN (SELECT DISTINCT SS.id
FROM Table_A SS WITH(nolock)
WHERE SS.id IN
(SELECT SSS.id FROM
Table_A SSS WITH (nolock)
WHERE SSS.stagetype = 5
AND SSS.statustype = 4 )
AND SS.statustype = 13
AND SS.stagetype = 5)
Actually the query using inner self join. I need DAX for above query. Please help on this.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
6 | |
4 | |
3 | |
2 |
User | Count |
---|---|
13 | |
10 | |
5 | |
5 | |
3 |