The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.