Hi,
Im fetching data from database using power query and in the query table I need to add a custom column in the query editor, the formula in excel goes like this
=ROUNDUP((B2-IF(DATE(YEAR(B2),1,1)+210+CHOOSE(WEEKDAY(DATE(YEAR(B2),1,1),1),0,6,5,4,3,2,1)>B2,DATE(YEAR(B2)-1,1,1)+210+CHOOSE(WEEKDAY(DATE(YEAR(B2)-1,1,1),1),0,6,5,4,3,2,1),DATE(YEAR(B2),1,1)+210+CHOOSE(WEEKDAY(DATE(YEAR(B2),1,1),1),0,6,5,4,3,2,1))+1)/7,0)
Cell B2 contains Date. How do I write this in query editor ?