Forum Discussion
M_SBS_6
Helper V
2 years agoDAX to M
Hi, I have the following DAX as a column buy wondered if this can be translated into M within Power Query at all? VAR _max_year = YEAR(MAX('Table'[appdate]))
VAR _min_year = _max_year - 3
VAR _...
_AAndrade
Resident Rockstar
2 years agoHi,
Try this code:
let
_max_year = Date.Year(List.Max(Table[appdate])),
_min_year = _max_year - 3,
_cur_appname = Table[appname],
_count = Table.SelectRows(Table, each [appname] = _cur_appname and Date.Year([appdate]) >= _min_year and Date.Year([appdate]) < _max_year),
_result = if Date.Year([appdate]) = _max_year and Table.IsEmpty(_count) then "Yes" else null
in
_result