Written By Rick de Groot

Rick is the founder of BI Gorilla. He believes learning is one of life's greatest pleasures and shares his knowledge to help you improve your skills.

  1. Great videos and blog, really helpful! Thanks for that! But the dynamic languages made me think about something else as well:

    Are there also ways to make the first day of your week dynamic? It should be great to be able use the same calendar like with the different languages you showed, but then also being able to change the first day of the week between (most commonly) sunday and monday.

    • Hi!

      That should be possible. If you use the build in function of Date.StartOfWeek the second parameter should get you going:

      Date.StartOfWeek(#datetime(2022, 12, 2, 8, 43, 00), Day.Monday)

      The second parameter you can then change to any other day of the week. For ISO weeks you could also try something. But I’m not sure the ISO standard allows for starting at different days of the week..

      • Hi,

        Thanks for the answer! That’s indeed the function I’m using now in several colums (week nr, day of week, etc) but when I try to use a variable in these (like CalenderLanguage in this article) for the Day.* part I get back errors instead of a working function.

        • I believe you can make it a variable. But instead of referencing Day.* you should probably reference the entire Day.Monday, Day.Tuesday etc. Else Power Query won’t recognize it as element of a function.

    • Hi Azma,

      To add a new language you make 3 changes:
      1. You add the new language to the parameter of chapter 1.2.
      2. You add the language to the LanguageParameter step as explained in chapter 1.3.
      3. You add the translated column names to the translation table from chapter 2.2.

      Make sure the language from step 1, has the same name as the Language description in step 2 and the New language column name of step 3. With these steps you should be good to go!

    • Hi Azma,

      I’ve provided the code in section 3.0. You can copy the last 2 queries into Power Query and that provides you with all the examples. You can create a blank query -> go to the advanced editor. And paste the codes in there.

      Hope that helps!


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.