cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Performance DAX measure

Hi!

I have a question about how i can increase the time my measure takes to calculate.
This measure calculates the difference of the revenue ("Omzet" in Dutch) of this year with last year. At the moment the measure takes around 3 seconds to calculate, but I am wondering if it is possible to increase the speed of the measure.

The measure:

``````Omzet totaal I LY =
VAR CY =
[Omzet totaal I]
VAR DC =
DISTINCTCOUNT(m_revenue_invoices_gaston[YearDate])
VAR LY =
CALCULATE([Omzet totaal I],PARALLELPERIOD(m_revenue_invoices_gaston[factuurdatum],-DC,YEAR))

Return
(CY - LY) / LY``````

The file has around 50k lines of data it needs to calculate. Thanks in advance! - willem
1 ACCEPTED SOLUTION
Resolver III

I have used this measure in the past to calculate what you want. It works really fast with many rows.

`YearOnYear = ((TOTALYTD([Revenue],'Date'[Date]))-(TOTALYTD([Revenue],SAMEPERIODLASTYEAR('Date'[Date]))))`

2 REPLIES 2
Community Support

Hi @WimBi ,

Has your problem solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

Resolver III

I have used this measure in the past to calculate what you want. It works really fast with many rows.

`YearOnYear = ((TOTALYTD([Revenue],'Date'[Date]))-(TOTALYTD([Revenue],SAMEPERIODLASTYEAR('Date'[Date]))))`

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.