Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Daniel29195
Super User
Super User

Performance issue with 20k dimension rows

the problem is as follow : 

 

i have a dimension table (20000 rows ) dimaccounts   and a fact table (  2 million rows )  fact_sales

 

im building a pareto chart : 

 my DAX measure : 

 

DEFINE

MEASURE 'fact'[cumu] = 

var _current_sales =[sales]
var ds = 
	filter(
		ADDCOLUMNS(
			ALLSELECTED('dim'[Value]) , 
			"@sales" , sum('fact'[Value])
		) ,
		[@sales] >= _current_sales
	)

var res =  sumx (ds  ,[@sales] ) 


return res  

 

 

[sales] measure is a simple sum (fact_sales[amount]) 

 

my approaches : 

1.  visual calculation --  performance issue. 

2.  rankx in code --  performance issue 

3.  window function --  huge performance issue. 

 

explanation of the measure : 

it is calculating the cumulative sum of sales, ordered by accountid .

so if i have per example : 

accountid         sales

1                           20

2                           40

3                            10

 

the visual should show  the cumulative as below : 

accountid            sales    cumulative

2                            40            40

1                             20           60

3                             10            70

 

 

the problem is that the dax measure is taking like 50 seconds to finish : 

 

Daniel29195_0-1726178871943.png

 

 

and im stuck into finding another way to caluclate the value that can improve performance. 

 

Any help on this would be appreciated. 

 

Note : even with a fact table of 20000 rows will take a long time to finish exeucting the dax code. 

 

 

 

 

 

6 REPLIES 6
sio2Graphs
Helper I
Helper I

Hello,

 

I have used the provided data to create the attached using "Pareto by sio2Graphs", you can also use "Pareto+”, to quickly construct pareto charts without needing to use measures or DAX.

 

It looks a bit strange, because there is no real variation in the sums of the sample dataset.

 

sio2Graphs

sio2graphs on AppSource 

 

Daniel.png

Daniel29195
Super User
Super User

@lbendlin 

and this is a file with sample data with real tables not calculated tables : 


https://drive.google.com/file/d/1sj_GoJZi4uh66mPDQcN3jH4UgvbmwP4C/view?usp=sharing

 

lbendlin
Super User
Super User

Post a sample PBIX.

@lbendlin 

 

dimtablee :

generateseries(1,20000)

 

facttable:

fact =
fact =
GENERATE(SELECTCOLUMNS(GENERATESERIES(1,20000),"dimid",[Value]) , GENERATESERIES(1,200))
 
 
link :  
Daniel29195_0-1726207738453.png

 

 

 

the file im testing on contains those 2 tables  created like this. 

Please keep in mind that in the real data , the calculation is affected by date . 

so i cant go with static calculation approaches 

You mention Pareto chart.  You have too many dimension values for that. The Column chart will cut off your data and do forced grouping, singnified by the blue "i"  in the top right corner. 

 

Find another dimension to use for the Pareto.

 

Note: as a super user you can attach files here directly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors