imla Member Nov 23, 2018 #1 Using Dax; I want to lookup a value by a date, but ignoring the day (just some moth and year) to fill a calculated column some thing like IF AND(month(table2[date]) = month(table1[date]), year(table2[date]=year(table1[date])) I will get the data Attachments Book1.xlsx 189 KB · Views: 5
Using Dax; I want to lookup a value by a date, but ignoring the day (just some moth and year) to fill a calculated column some thing like IF AND(month(table2[date]) = month(table1[date]), year(table2[date]=year(table1[date])) I will get the data
imla Member Nov 23, 2018 #3 Chihiro said: What version of Excel and PowerQuery/Pivot do you have? Click to expand... I use excel 2016
Chihiro said: What version of Excel and PowerQuery/Pivot do you have? Click to expand... I use excel 2016
Chihiro Excel Ninja Nov 23, 2018 #4 Ok, here are my recommendations. Load data first to PowerQuery and apply any transformation necessary there (data types etc) then load to DAX model. This ensures model integrity. This sort of operation is best done in PowerQuery stage. Load date & exch tables. Add custom column to date table. Code: =#date(Date.Year([dateID]),Date.Month([dateID]),1) Use Custom Column and exch[date] as key and Left Outer join exch into date. Then expand exchange column. However, I'm not sure what exactly you are trying to do with this info.
Ok, here are my recommendations. Load data first to PowerQuery and apply any transformation necessary there (data types etc) then load to DAX model. This ensures model integrity. This sort of operation is best done in PowerQuery stage. Load date & exch tables. Add custom column to date table. Code: =#date(Date.Year([dateID]),Date.Month([dateID]),1) Use Custom Column and exch[date] as key and Left Outer join exch into date. Then expand exchange column. However, I'm not sure what exactly you are trying to do with this info.
imla Member Nov 23, 2018 #5 Good idea, better than what I'm currently using! I will apply it. Thank you very much.