Comparison Of Values Between Top N And Average

In this tutorial, you’ll learn about the comparison of values between Top N and Average Of Others in LuckyTemplates. This analysis technique helps add directionality to your solution by seeing how much the Top N and Bottom N customers are above the average of the remaining customers. You can watch the full video of this tutorial at the bottom of this blog.

Table of Contents

Setting Up The Model For The Comparison Of Values

In this tutorial, we will recreate the following report:

Comparison Of Values Between Top N And Average

You can see that if you change the context through the slicer, both the customers and the numbers change.

This is a simple sales-based model with a fact table and dimensions table. You can see its data model below:

Comparison Of Values Between Top N And Average

It has a standard waterfall layout with the Dates, Customers, and Products dimension tables on the top and the Sales fact table below.

All relationships are one-to-many with the dimensions on the “one” side and the fact table on the “many” side.

Recreating The Sample Report

With the data set, you’ll need to add a couple of additional tables to use a slicer for the Top N and direction selection.

Creating Tables and Slicers

First, go to the Modeling toolbar and add a new parameter. Name the parameter Top N and set the data type to Whole Number.

Input 1 and 10 in the Minimum and Maximum parameters. Then, input 1 and 5 in the Increment and Default parameters.

Comparison Of Values Between Top N And Average

Next, create a Directions table with values of direction for top and bottom, and a sort column. Go to the Home toolbar and click Enter Data.

Comparison Of Values Between Top N And Average

Drag the Date column, Top N parameter, and Direction column to the canvas and turn them into a slicer.

Comparison Of Values Between Top N And Average

Next, add a calculated table to add an Others row to the list of all customers.

Comparison Of Values Between Top N And Average

To display the ranked values, add a table to the canvas. Drag Customer from the Customers Plus Others table in the table inside the dashboard.

Comparison Of Values Between Top N And Average

Building Measures For The Comparison Of Values

Change the title of the table with the Customer Table Title measure.

Turn the Title off, and click the button in the Title Text below.

Comparison Of Values Between Top N And Average

Select Field Value for the Format By parameter. Next, Select Customer Table Title inside the Display Measures for the Based on field parameter.

Comparison Of Values Between Top N And Average

The Customer Table Title measure harvests the direction and the Top N slicers and combines them with static text to generate a result.

Comparison Of Values Between Top N And Average

Next, calculate the appropriate ranking value. To do this, you need both the normal top-down descending ranking plus the bottom-up ascending ranking.

This is the descending ranking:

Comparison Of Values Between Top N And Average

And this is the ascending ranking:

Comparison Of Values Between Top N And Average

Use the Top N and Direction slicers to return the appropriate customer ranking. Here’s an example of how it should look from the Customer Rank measure:

Comparison Of Values Between Top N And Average

The function harvests the values from the two slicers and uses them to figure out what ranking to display.

Now, check if the ranking measures correspond to the slicer selections by placing the measures in the table.

Comparison Of Values Between Top N And Average

If you change the context with the slicer selections, the values inside the table should also change accordingly.

After checking the measures, remove them except the Customer Rank measure and add the Customer Sales measure.

Comparison Of Values Between Top N And Average

The Customer Sales measure uses a logic to handle three cases.

  • #1: If the customer is ranked in the Top N, it will use the Sales value.
  • #2: If the customer name is Others, it will use the average of the Sales value for all non-ranked customers.
  • #3: If the customer is not ranked in the Top N, it will return as blank.

Comparison Of Values Between Top N And Average

Creating A Stacked Column Chart

Copy and paste the table and turn it into a line and stacked column chart. Remove the Customer Rank measure (you won’t need it).

Comparison Of Values Between Top N And Average

Next, add the Average Of Other Customer Sales measure into the line values.

Comparison Of Values Between Top N And Average

Once done, go to Filters and filter out Customer Sales that are not blank and click Apply Filter.

Comparison Of Values Between Top N And Average

Lastly, similar to the Customer Table Title measure, change the title of the visual with the Customer Chart Title measure.

Comparison Of Values Between Top N And Average

This measure harvests the selections of the Top N and Direction slicers and combines them with static text to form the title.

Comparison Of Values Between Top N And Average

From there, you’ll notice that the table says “and” while the chart says “versus”.

Making The Visuals Stand Out

The next step is to color the columns.

The Customer Chart Colors measure assigns a grey color if the customer name is Others. Otherwise, it will apply a blue color.

Comparison Of Values Between Top N And Average

Go to Data Colors and select the button in the Default Color.

Comparison Of Values Between Top N And Average

Select Field Value for the Format By parameter and select Customer Chart Colors inside the Display Measures for the Based On Field.

Comparison Of Values Between Top N And Average

Creating The Final Measures

Now, use math and measure branching to create measures for the difference between Customer Sales and the Average Of Others Sales.

This measure uses subtraction to get the Sales volume.

Comparison Of Values Between Top N And Average

This measure uses division to get the percentage value.

Comparison Of Values Between Top N And Average

Add the measures into the Tooltips of the chart visual.

Comparison Of Values Between Top N And Average

After that, when you hover over a customer, you can see how much their Sales were worth and how they compare to the average amount.

Comparison Of Values Between Top N And Average

These visuals are responsive to the slicers in your canvas. You can utilize them to get data from different time periods and directions.


How To Showcase Top Result In A LuckyTemplates Card Visualization
Show Top Or Bottom Results Using Ranking In Power BI
Visualization Technique – LuckyTemplates Column Charts & Filters

Conclusion

This tutorial shows the comparison of values between the Top N and Average Of Others values in .

The difference in the values is essential when monitoring the performance of your products. It helps you create more strategies to improve your sales. You can use this technique to improve and accomplish the sales goals in your organization.

Greg

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.