Summarize Function
Summarize Function
POWER BI
SUMMARIZE
FUNCTION
Niluthpal Chowdhury
DATA-MODEL
Niluthpal Chowdhury
SYNTAX
Lets look into first part of the syntax which is table and
group by columnName
SUMMARIZE(FactInternetSales,DimProduct[EnglishProduc
tName],DimGeography[City])
SUMMARIZE(FactInternetSales,DimProduct[EnglishProductNa
me],DimGeography[City],"Total
Quantity",SUM(FactInternetSales[OrderQuantity]),"Unit
Price",SUM(FactInternetSales[UnitPrice]),"Total
Sales",SUMX(FactInternetSales,FactInternetSales[OrderQuanti
ty]*FactInternetSales[UnitPrice]))
Likewise we will do the same for Unit Price and for Total
Sales we will use SUMX function which will go to sales table
and multiply orderquantity to unitprice row by row and
return the SUM of calculated values.
This will be
the Result
Niluthpal Chowdhury
If you look at the Data Model then you can see that both
city and productname column are comming from different
dimension table. So we will have to create a summarize
table and then we find the max values based on that table.
Let’s create a measure now
max total sales =
var a = SUMMARIZE(FactInternetSales,
DimGeography[City],DimProduct[EnglishProductName])
RETURN
MAXX(a,[Total Sales]) Lets Understand this Measure
LIKE
COMMENT
REPOST
And FOLLOW me for such
Content