The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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_NUMBER])
Solved! Go to Solution.
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.
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.