Creating A Date Table In LuckyTemplates The Fastest Way Possible

I’m going to show you a new approach in creating a date table in LuckyTemplates. You may watch the full video of this tutorial at the bottom of this blog.

I’ve done so many tutorials about creating date tables over the years, but the new method I’m using now is, by far, the most efficient way to do it. This is actually an approach created by Melissa, one of our experts. She does a lot of work around M codes, which is what I’m going to use for this approach.

Not only will this approach make the entire process faster, but it’s also going to yield better quality results.

Table of Contents

Date Table M Code

The first thing I’m going to do is go into the Query Editor where I’ll create a new blank query.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Once the blank query opens up, I’ll leave it as it is temporarily.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Now, I’m going to go to the . Anybody can access the posts here.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

If you scroll down, you’ll see that there’s an entire catalog of topics. What I need is inside the M Code Showcase. M codes are used inside the query editor.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

The code that I need is inside the topic called Extended Date Table.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Once I click on it, I’ll scroll to the very top. This is where Melissa left the code that’s going to give me the most comprehensive date table I’ve seen so far.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Again, I used to have a code of my own that I used for creating a date table in LuckyTemplates. But what Melissa did was study every nuanced use of a date table and came up with the code to generate all the details needed.

So I’m going to copy that entire code and jump back into LuckyTemplates. I’ll go straight into the Advanced Editor.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Then I’m going to highlight the default information in there and delete it all.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Now, I’m going to go paste the code I copied from the forum.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Then I’ll press on Done.

Adding Parameters

Once I click on Done in the Advanced Editor, I’ll be prompted to enter some parameters.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

These parameters will dictate the data going into my date table.

I’ll use January 1, 2018 as my StartDate and December 31, 2022 for my EndDate.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

It also allows me to decide when my fiscal year will start. Assuming that my start month is July, I put 7 under FYStartMonth. I’m also going to use Monday as the start of my week, so I put 1 under WDStartNum.

There’s also an option to add holidays. All you need to do is import a custom list of holidays and you’re good to go. Melissa covers how to do that in another tutorial.

Once I click Invoke, I’ll have a comprehensive date table that covers every imaginable date combination or date metric.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Considering the scope of this date table, working on time intelligence is much easier with this approach. It eliminates the need to input additional columns because this already covers everything.

One thing that makes LuckyTemplates reports intuitive is the way you name all the elements. So I’m just going to rename this table and call it Dates.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

I’ll also change the query name to Dates Query.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Making Changes To The Date Table

What if I need a different set of dates in my date table? All you need to do is go to the formula bar and change what needs to be changed.

Let’s say I want to change the years 2018 and 2022.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

I’ll just change that directly within the formula. In this case, I changed 2018 into 2017, and 2022 into 2023.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Once I’ve made all the changes, I just need to push Enter.

Just like that, my table now carries the dates that I put into the formula.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

I’ll just click on Close & Apply to save those changes in the system.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Seeing all the steps I applied here, creating a date table in LuckyTemplates now takes less than 30 seconds. It’s a mix of efficiency and quality, especially if you look at how much date information it carries.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

There will be times when you won’t really need all the information in this table. If this happens, just go back into the query editor and remove the columns you don’t need.

It’s also possible to make the process even faster. That’s by saving this table as a template.

Just go to file and click on Save As.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Then, save this as a PBIT file.

Creating A Date Table In LuckyTemplates The Fastest Way Possible

Now, you can use the template each time you need a date table. Instead of going through that entire process, you can automatically start with your date table each time.


How To Work With Multiple Dates In LuckyTemplates
Showing Month to Date (MTD) To Current Date In LuckyTemplates Using DAX
Calculate Financial Year To Date (FYTD) Sales In LuckyTemplates Using DAX

Conclusion

Creating a date table in LuckyTemplates is now more efficient thanks to the M code that Melissa created. The great thing about this is that date tables are always essential in different types of work, especially if there’s a time element involved.

You can also look at other ways that this M code can be used. As I mentioned earlier, Melissa covered the part about adding holidays into the equation in a separate tutorial – this could be a good place to start!

All the best,

Leave a Comment

Excel Hücrelerini Metne Sığdırma: 4 Kolay Çözüm

Excel Hücrelerini Metne Sığdırma: 4 Kolay Çözüm

Excel hücrelerini metne sığdırmak için güncel bilgileri ve 4 kolay çözümü keşfedin.

Bir Excel Dosyasının Boyutu Nasıl Küçültülür – 6 Etkili Yöntem

Bir Excel Dosyasının Boyutu Nasıl Küçültülür – 6 Etkili Yöntem

Bir Excel Dosyasının Boyutunu Küçültmek için 6 Etkili Yöntem. Hızlı ve kolay yöntemler ile verilerinizi kaybetmeden yer açın.

Pythonda Self Nedir: Gerçek Dünyadan Örnekler

Pythonda Self Nedir: Gerçek Dünyadan Örnekler

Python'da Self Nedir: Gerçek Dünyadan Örnekler

Rde Bir RDS Dosyası Nasıl Kaydedilir ve Yüklenir

Rde Bir RDS Dosyası Nasıl Kaydedilir ve Yüklenir

R'de bir .rds dosyasındaki nesneleri nasıl kaydedeceğinizi ve yükleyeceğinizi öğreneceksiniz. Bu blog aynı zamanda R'den LuckyTemplates'a nesnelerin nasıl içe aktarılacağını da ele alacaktır.

İlk N İş Günü Tekrar Ziyaret Edildi – Bir DAX Kodlama Dili Çözümü

İlk N İş Günü Tekrar Ziyaret Edildi – Bir DAX Kodlama Dili Çözümü

Bu DAX kodlama dili eğitiminde, GENERATE işlevinin nasıl kullanılacağını ve bir ölçü başlığının dinamik olarak nasıl değiştirileceğini öğrenin.

LuckyTemplatesda Çok İş Parçacıklı Dinamik Görsel Tekniği Kullanarak Öngörüleri Sergileyin

LuckyTemplatesda Çok İş Parçacıklı Dinamik Görsel Tekniği Kullanarak Öngörüleri Sergileyin

Bu eğitici, raporlarınızdaki dinamik veri görselleştirmelerinden içgörüler oluşturmak için Çok Kanallı Dinamik Görseller tekniğinin nasıl kullanılacağını kapsayacaktır.

LuckyTemplatesda İçeriği Filtrelemeye Giriş

LuckyTemplatesda İçeriği Filtrelemeye Giriş

Bu yazıda, filtre bağlamından geçeceğim. Filtre bağlamı, herhangi bir LuckyTemplates kullanıcısının başlangıçta öğrenmesi gereken en önemli konulardan biridir.

LuckyTemplates Çevrimiçi Hizmetindeki Uygulamaları Kullanmak İçin En İyi İpuçları

LuckyTemplates Çevrimiçi Hizmetindeki Uygulamaları Kullanmak İçin En İyi İpuçları

LuckyTemplates Apps çevrimiçi hizmetinin çeşitli kaynaklardan oluşturulan farklı raporların ve içgörülerin yönetilmesine nasıl yardımcı olabileceğini göstermek istiyorum.

Fazla Mesai Kâr Marjı Değişikliklerini Analiz Edin - LuckyTemplates ve DAX ile Analitik

Fazla Mesai Kâr Marjı Değişikliklerini Analiz Edin - LuckyTemplates ve DAX ile Analitik

LuckyTemplates'da ölçü dallandırma ve DAX formüllerini birleştirme gibi teknikleri kullanarak kâr marjı değişikliklerinizi nasıl hesaplayacağınızı öğrenin.

DAX Studioda Veri Önbellekleri İçin Materyalleştirme Fikirleri

DAX Studioda Veri Önbellekleri İçin Materyalleştirme Fikirleri

Bu öğreticide, veri önbelleklerini gerçekleştirme fikirleri ve bunların DAX'ın sonuç sağlama performansını nasıl etkilediği tartışılacaktır.