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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rlsantos
Frequent Visitor

MEASURE YY% WORKING SLOW

Hi everyone!

Who can help me with this?

I have a simple mesure tha calculate % in same period from last year.

REAL SALES YY%:=IFERROR([REAL SELLIN]/CALCULATE([REAL SELLIN];DATEADD(d_DATES[DATES];-1;YEAR))-1;0)

This measure is Working very very Slow, can enyone tell me whats wrong?

 

1 ACCEPTED SOLUTION

@rlsantos  can you try using the variables and see if it improves the performance

Measure:=
VAR _0 = [REAL SELLIN]
VAR _1 = CALCULATE(_0, SAMEPERIODLASTYEAR(d_DATES[DATES]))
VAR _2 = DIVIDE(_0,_1)
RETURN IFERROR(_2,0)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

5 REPLIES 5
smpa01
Super User
Super User

@rlsantos  can you try SAMEPERIODLASTYEAR syntax?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

I've already tried, but it doesn't matter, it's slow

@rlsantos  can you try using the variables and see if it improves the performance

Measure:=
VAR _0 = [REAL SELLIN]
VAR _1 = CALCULATE(_0, SAMEPERIODLASTYEAR(d_DATES[DATES]))
VAR _2 = DIVIDE(_0,_1)
RETURN IFERROR(_2,0)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Thanks Bro!!
It worked 

@rlsantos  glad to be of help. Can you please accept the answer.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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