How To Date Harvest In LuckyTemplates Using DAX

In this tutorial, we’ll go through date harvesting in LuckyTemplates to get information from a date slicer for a time intelligence analysis. You may watch the full video of this tutorial at the bottom of this blog.

From previous tutorials, we’ve learned how to extend our date table while integrating a holiday table to it. Now, we need to harvest dates from the data slicer to start using our table.

Technically, we can harvest the end points of the slicer. But if the date slicer is utilized, we can harvest valuable information like the following:

How To Date Harvest In LuckyTemplates Using DAX

There are five ways to perform a date harvest in LuckyTemplates:

Table of Contents

1. Basic Harvest

In this example, the basic harvest is a measure called Harvest Date Selected. It is getting a from the Date table in the Date field.

How To Date Harvest In LuckyTemplates Using DAX

If we take and drop that into the Field, it’ll start off blank.

How To Date Harvest In LuckyTemplates Using DAX

And if we choose a date, it will harvest that date in another measure through measure branching.

How To Date Harvest In LuckyTemplates Using DAX

If we change it to a “Between” slicer, it will show blank because using SELECTEDVALUE requires a single unique value.

How To Date Harvest In LuckyTemplates Using DAX

Instead, we need to use this formula for multiple selected dates:

How To Date Harvest In LuckyTemplates Using DAX

We must be as narrow as possible with the filter by doing both the dates table and the date field.

If we drop the Min AllSelected Measure into the Fields section, we’ll see that it harvested the beginning of the slicer.

How To Date Harvest In LuckyTemplates Using DAX

And as we change it, it harvests appropriately.

How To Date Harvest In LuckyTemplates Using DAX

Similarly, if we drop the Max AllSelected measure in the Fields section, we’ll get the endpoint of the slicer.

How To Date Harvest In LuckyTemplates Using DAX

Moving the slicer around picks up the endpoint.

How To Date Harvest In LuckyTemplates Using DAX

Now, we can also use and instead of and ALLSELECTED. If we look at MINX, it pulls the table first or flips the measure around.

How To Date Harvest In LuckyTemplates Using DAX

If we drop it into the Fields section, it will show the same minimum date value.

How To Date Harvest In LuckyTemplates Using DAX

Now, we need to know which one to use. We should uncheck the MINX box.

We’ve now got these 2 endpoints harvested.

How To Date Harvest In LuckyTemplates Using DAX

2. Pre-Slicer Harvest

We can also look at the beginning of the slicer up to a day before the selected minimum date through the Min All Harvest measure in this example.

How To Date Harvest In LuckyTemplates Using DAX

Calculate the minimum date and remove the filter on Dates to harvest all the dates instead of the ALLSELECTED dates.

If we drop it in the Fields section, we’ll get January 1, 2018.

How To Date Harvest In LuckyTemplates Using DAX

LuckyTemplates stores dates in a serial number for the days after January 1st, 1990.

In the Min-1 Allselected Harvest formula, we’ll see the measure which is MIN -1 over the ALLSELECTED range.

How To Date Harvest In LuckyTemplates Using DAX

If we drop this measure into the Fields section, it will give us December 10, 2018.

How To Date Harvest In LuckyTemplates Using DAX

After harvesting the selected range and the pre-slicer range, we can also harvest the date range that comes after the selected range. However, the pre-slicer range is what’s important.

If we look at the Cumulative Sales formula, we’ll see this pattern that gives us the standard ALLSELECTED Cumulative Sales.

How To Date Harvest In LuckyTemplates Using DAX

To have a starting balance before the Cumulative Total starts, we can carry forward every data from the start up to the point before the first Cumulative Total.

The Pre-Slicer Cumulative Balance formula will show the start date of the Min All Harvest and the end date of Min-1 All Selected Harvest. The function filters the start and end date. The COALESCE function will return the date to 0 when it’s blank.

How To Date Harvest In LuckyTemplates Using DAX

The Total Cumulative Sales formula calculates our Cumulative Sales, pre-slicer cumulative balance, and the total of both.

How To Date Harvest In LuckyTemplates Using DAX

Changing the range affects the pre-slicer balance but the total remains the same.

How To Date Harvest In LuckyTemplates Using DAX

3. All-In Harvest

The third method harvests the entire date table from the start to the end of the slicer range. However, this will require a longer setup.

First, set the customer name up by creating a new measure.

In this example, this measure is called Top Customer.

How To Date Harvest In LuckyTemplates Using DAX

Use MAXX to get the customer’s name, to filter the customers table by Sales, and , , and to prevent the return of a name in the total range.

Next, cut the date table into two separate tables where one has the values inside the slicer and the other outside.

How To Date Harvest In LuckyTemplates Using DAX

Now, create a Disconnected Dates formula which takes from the extended dates table and copies them.

How To Date Harvest In LuckyTemplates Using DAX

We’ll then see a slicer for that table.

How To Date Harvest In LuckyTemplates Using DAX

The Inside Range formula takes a table that’s ALLSELECTED in the Disconnected Dates table and reviews each value to check if they are in the date table list.

How To Date Harvest In LuckyTemplates Using DAX

If they’re in the table list, it will return to 1. If not, it will return to 0. It harvests the dates from the Disconnected Dates table and compares the values.

Next, put a visual filter for the two tables. Set the inside slicer range variable to 1 and the outside to 0.

How To Date Harvest In LuckyTemplates Using DAX

The records inside the slicer range will go to the Inside Slicer, and the records outside will go to the Outside Slicer.

How To Date Harvest In LuckyTemplates Using DAX

If we adjust the slicer, the tables also adjust.

The Inside Slicer table starts with December 31, the beginning date of the slicer. The Outside table starts with January 1 and ends a day before December 1 and starts back at the end of the slicer.

How To Date Harvest In LuckyTemplates Using DAX

4. Hierarchy Slicer For Financial Analysis

The fourth method is a hierarchy slicer to structure the date slicer. This is the best for financial analysis.

First, go to Hierarchy Slicer and go to Dates.

How To Date Harvest In LuckyTemplates Using DAX

Drop Fiscal Quarter and Fiscal Year in the Field section to create a hierarchy that we can use to select years, quarters, or individual periods with ease.

How To Date Harvest In LuckyTemplates Using DAX

How To Date Harvest In LuckyTemplates Using DAX

5. OKVIZ Smart Filter Pro

Lastly, we have the OKVIZ Smart Filter Pro.

OKVIZ Smart Filter Pro gives many functionalities, tooltips, and control over our slicers.

It has different modes that provide many alterations and show the fields we have, along with the number of children in the hierarchy.

Click the OKVIZ button, choose Format, pick Mode, and then choose Hierarchy. It will show the controls to instantly expand and collapse the nodes.

How To Date Harvest In LuckyTemplates Using DAX

Also, by dropping the Total Sales in the Tooltips section, we’ll see the Total Sales per fiscal year and quarters.

How To Date Harvest In LuckyTemplates Using DAX

How To Date Harvest In LuckyTemplates Using DAX

Conclusion

This method is highly recommended if you do a lot of financial and budgeting analysis because it can help you gain more control and functionality over your work and reports.

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.