cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
prakash_
Frequent Visitor

Cumulative by rank is very slow in power bi

Hi All,

 

I am trying to calculate cumulative total by rank, my scneriao is I have a metric table where I got "total quantity" and "CM1"as a measure. first I want to rank customer by "CM1" and then based on ranking I want to calculate cumulative total sold quantity.

 

However I have been able to achived this calculation but its taking very long time to load the table visuals, it takes alomost 2 to 5 mins. and that is because in the table it has more than 21 thousand rows.

 

Hers is the measure calcuation - 

Cummulative Total Sold Quantity =
VAR CurrentRank = [Ranking total CM1_]
VAR SummarizeCustomer =
SUMMARIZE(
ALLSELECTED('Customer Parameter_'),'Customer Parameter_'[Customer])
VAR CustomerSales =
ADDCOLUMNS ( SummarizeCustomer, "@Sales", [Total Sold Quantity], "@Rank", [Ranking total CM1_] )
VAR Result =
SUMX ( FILTER ( customerSales, [@Rank] <= CurrentRank ), [@Sales] )
RETURN
Result
 
MeasuresMeasuresTableTable
 
Please help me to reduce the load time or optimize the calculation.
 
Thanks in advance 
1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi @prakash_ ,

Could you pls share your pbix file and remember to remove confidentail data.

 

 

Best Regards

Lucien

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors