Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello.
I have websource, and function that imports currency exchange data and fills daily rates on table with genetated dates. I'm pretty new with PBI, so changing this line below is challenging for me.
Problem: Line below creates dates from current date to -365 days from current date.
Number.From(Date.AddDays(DateTime.Date(DateTime.LocalNow()),-365))..Number.From(DateTime.Date(DateTime.LocalNow()))
Question: How to change that line so, that starting date becomes fixed to 01/01/2019.
Thank you 🙂
Solved! Go to Solution.
Found the answer.
Number.From(#datetime(2019, 1, 1, 0, 0, 0))..Number.From(DateTime.Date(DateTime.LocalNow()))
Found the answer.
Number.From(#datetime(2019, 1, 1, 0, 0, 0))..Number.From(DateTime.Date(DateTime.LocalNow()))
@MikaelB , refer the way to create in M. You have the way to start
https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns
https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-2-fiscal-columns
or the Dax way
1.Creating Financial Calendar - Decoding Date and Calendar 1-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...
2.Any Weekday Week - Decoding Date and Calendar 2-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |