Forum Discussion
scavalcantes
8 years agoRegular Visitor
Calculate
I have the image table below, where I need to generate a custom column in the query editor with statistics (average, minimum, maximum, mode.sngl and etc) of the columns Gra1 through Gra5 and Esp1 thr...
stretcharm
8 years agoMemorable Member
You can also write multiple dax measures that calculate the stats for each of the base columns
https://www.daxpatterns.com/statistical-patterns/
I like to create a dax summary table than can be joined to your other data using ADDCOLUMNS and SUMMARIZE
https://www.sqlbi.com/articles/best-practices-using-summarize-and-addcolumns/
BTW r is very fast, though does need the data to be in memory.
scavalcantes
8 years agoRegular Visitor
O problema da performace foi devido a converter colunas em linha por grupo de colunas, com isso, o desempenho ficava compromentido.
A solução foi selecionar todas as colunas que tem valores a calcular e assim fazer o pivot