Forum Discussion
Anonymous
5 years agoNot applicable
Dax to M
Hi, can you help me traslate this to M ? Need a custom column: Train_no_unique = SWITCH(TRUE(), MONTH(BPS[date])<=11,YEAR(BPS[date])&"_"&BPS[TRAIN_NUMBER], YEAR(BPS[date])+1&"_"&BPS[TRAIN_NUMBE...
- 5 years ago
I think it would like:
= if Date.Month([date]) <= 11 then Text.From(Date.Year([date])) & "_" & [TRAIN_NUMBER] else Text.From(Date.Year([date] + 1)) & "_" & [TRAIN_NUMBER]please note that M is case sensitive, so if your column is Date use Date not date.
artemus
Microsoft Employee
5 years agoI think it would like:
= if Date.Month([date]) <= 11 then Text.From(Date.Year([date])) & "_" & [TRAIN_NUMBER] else Text.From(Date.Year([date] + 1)) & "_" & [TRAIN_NUMBER]
please note that M is case sensitive, so if your column is Date use Date not date.