direct query performance dax measure
2 Topicsslow performance of the measure xAVG_STOCK_V_DAYS
I have an issue with the slow performance of the measure xAVG_STOCK_V_DAYS. In production, I have a live mode model connected to an analytical cube in Fabric. I have replicated the required tables for the calculation of the measure in the report attached here. The tables in production are dozens of times larger. The xAVG_STOCK_V_DAYS measure takes approximately 8 minutes to compute in production. I would appreciate assistance in improving the measure's performance. https://drive.google.com/file/d/1O_jrsYubmYROx6N-_bBOJrHf4oG7oTXT/view?usp=sharing xAVG_STOCK_V_DAYS= xAVG_STOCK_V_DAYS = VAR DataMin = MIN ( DimDate[Date_Name] ) VAR DataMax = MAX ( DimDate[Date_Name] ) RETURN CALCULATE ( AVERAGEX ( SUMMARIZE ( 'DimDate', DimDate[Date_Name] ), [Stock] ), DATESBETWEEN ( DimDate[Date_Name], DataMin, DataMax ) ) Stock= Stock = VAR DateChoose = CALCULATE ( MAX ( DimDate[Date_Name] ) ) + 1 RETURN CALCULATE ( SUMX ( FactInventoryStore, ( FactInventoryStore[Units] ) ), ALL ( 'DimDate' ), FactInventoryStore[TECH_DateStart] <= DateChoose, FactInventoryStore[TECH_DateEnd] > DateChoose )Solved1.4KViews0likes8CommentsDax & Direct Query Performances
Hi, I noticed that there are performances issues when I create measure when I am connected to date source (sql server) in direct query mode. For sample if I put a column from a fact table and use the native sum of power bi table the result is less than 1 or 2 seconds. But If I create a measure it's everytime longer. For sample a simple calculate with a filter on one column it will be longer. One other example Is the round function. If I use a dynamic round digits it will be longer (more than 10 secs) than putting the value in variable making a switch on the variable (Switch (roundDigits, 1, round(value,1) .....) it will take maybe 3 secs Can someone explain me why ? And it seems that the calculation in direct query mode is supported mostly by the database ? Do you have a good documentation please ? Many thanks408Views0likes1Comment