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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
oakgogo
Helper II
Helper II

how to improve performance of DAX

here is a dax and I use it in the marix in value, but it is too slow to open in the visual, do you know how to improve the performance? Thank you.

one example of dependent measure:CMS_Amount_Actual_Y-4=CALCULATE(SUM(fact_sales[Value])

,fact_sales[Metrics]="Amount"
,fact_sales[Datatype]="North",
SELECTEDVALUE(dim_date[Year]) - 4 = fact_sales[Year]  
)

 

Cal_Overview =
SWITCH(TRUE,
------CMS Sales
SELECTEDVALUE(Dim_Table_KPI_Overview[Order])= 1 && SELECTEDVALUE(Dim_Table_Row_Overview[Order]) =1,
FORMAT([CMS_Amount_Actual_Y-4],"0.0"), --"General Number"
SELECTEDVALUE(Dim_Table_KPI_Overview[Order])= 2 && SELECTEDVALUE(Dim_Table_Row_Overview[Order]) =1,
FORMAT([CMS_Amount_Actual_Y-3],"0.0"),
..................

..................

1 REPLY 1
lbendlin
Super User
Super User

Read about using variables - you only need to run SELECTEDVALUE once per column.

 

Familiarize yourself with DAX Studio. It is the ultimate tool for query tuning.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.