Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I Have a requirement, to point to Source 1 for Jan and Feb of every year, rest of the year to source 2, I have tried to use the date.is in month function but we can only pass one at a time, we can't make dynamic
Thanks
Kumar
Solved! Go to Solution.
Hi, @Santosh19
In Power Query:
Source = if Date.Month(DateTime.FixedLocalNow())<3 then Excel.CurrentWorkbook(){[Name="Table1"]}[Content]
else Excel.CurrentWorkbook(){[Name="Table2"]}[Content]
----------------
Where Excel.CurrentWorkbook(){[Name="Table1"]}[Content] would be your Source1 and Excel.CurrentWorkbook(){[Name="Table2"]}[Content] would be your Source2. The condition Date.Month(DateTime.FixedLocalNow())<3 evaluates the number of month.
Hi, @Santosh19
In Power Query:
Source = if Date.Month(DateTime.FixedLocalNow())<3 then Excel.CurrentWorkbook(){[Name="Table1"]}[Content]
else Excel.CurrentWorkbook(){[Name="Table2"]}[Content]
----------------
Where Excel.CurrentWorkbook(){[Name="Table1"]}[Content] would be your Source1 and Excel.CurrentWorkbook(){[Name="Table2"]}[Content] would be your Source2. The condition Date.Month(DateTime.FixedLocalNow())<3 evaluates the number of month.
Hi, @Santosh19
May I ask if your problem has been solved? Is the above post helpful to you?
If it does, could you please mark the post which help as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.
Not an answer to your exact question but an alternative approach.