Dimensions and Expressions Tabs using Aggregate function Aggr() - QlikView Tutorial - Session 34

Опубликовано: 23 Октябрь 2024
на канале: In Music Vibes
574
2

In this session you will learn about Dimensions and Expressions Tabs using Aggregate function Aggr()

Aggr()
--------
Similar to SQL Group By
Aggr(Exp,Dim1,Dim2,...)

Customer wise Grouping
-----------------------------------
Aggr(Sum(Sales),Customer)

Customer Salesman wise Grouping
-------------------------------------------------
Aggr(Sum(Sales),Customer,Salesman)


Examples
-------------
Displaying Top 5 Customers
Displaying Top Salesman foreach Customer

Displaying Top 5 Customers
---------------------------------------
Dimension Limits Tab
Dimensions Tab
Expressions Tab


Dimensions Tab
-----------------------
Perform Customer wise Grouping
Calculate Ranks
If Rank less_than_symbol=5, Display Customer

Go to Dimensions Tab - Select Dimension - Edit -
If(Aggr(Rank(Sum(Sales)),Customer) less_than_symbol=5,Customer)

Expressions Tab
----------------------
If(Aggr(Rank(Sum(Sales)),Customer)less_than_symbol=5,Sum(Sales))


Displaying Top Salesman for Each Customer
--------------------------------------------------------------
Dimensions Tab
----------------------
Perform Customer Salesman wise Grouping
Calculate Ranks
If Rank=1, Dsiplay Salesman

If(Aggr(Rank(Sum(Sales)),Customer,Salesman)=1,Salesman)

Expressions Tab
------------------------
If(Aggr(Rank(Sum(Sales)),Customer,Salesman)=1,Sum(Sales))