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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ben81
Helper I
Helper I

DAX Optimisation

Hi, 

Just wanted to get some pointers on optimising some DAX. I've got a series of DAX measures doing a similiar measures using sum/sumx and countrow functions. These are then in turn used in other measures to add together/subtract and divisions. 

However some are taking sometime to process and I've tried using DAX Studio which has helped pin point some of the slower measures but not sure how to optimise.

Example of a typical measure: 
Measure=

//Determined by user when changing a date slicer
VAR _StartDate = [Start Date]
VAR _EndDate = [Start Date]

RETURN
Calculate (
  SUMX('TABLE1',COLUMN1, COLUMN2),
TABLE1,[COLUMN2] = "value",
DateTBL,[DATE] >= _StartDate & 'DateTbl'[Date] <= _EndDate
)


Is there a better way of writing this?

Pretty much all my measures are like this and then I have some that just go Total = [Measure1] + [Measure2] et..

 

Thanks,

 

Ben

1 REPLY 1
Surya9
Helper V
Helper V

Yes you can use this, if you want you can also try DATESBETWEEN (https://docs.microsoft.com/en-us/dax/datesbetween-function-dax)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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