Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello:
I'm trying to express this query into DAX, because using SQL queries is not posible in the current env I'm working on.
Which sql dialect do you use? It seems the syntax is wrong ...
select ID
, MAX(YEAR) as max_yr
, NAME
, SPECIALIZATION
from STUDENTS_TABLE A
where not exists
( select NULL
from STUDENTS_TABLE B
where B.YEAR in (A.YEAR - 1,A.YEAR - 2) and A.ID=B.ID
)
group by A.ID, A.NAME, A.SPECIALIZATIONTable =
SUMMARIZECOLUMNS(
STUDENTS_TABLE[ID], STUDENTS_TABLE[NAME], STUDENTS_TABLE[SPECIALIZATION],
"max_yr",
MAXX(
FILTER(
VALUES( STUDENTS_TABLE[Year] ),
VAR __yr = STUDENTS_TABLE[Year]
RETURN
ISEMPTY(
FILTER(
VALUES( STUDENTS_TABLE[Year] ),
STUDENTS_TABLE[Year] IN { __yr - 1, __yr - 2 }
)
)
),
STUDENTS_TABLE[Year]
)
)
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 26 | |
| 17 | |
| 12 | |
| 11 | |
| 10 |