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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

% Change showing 0% if a value is 0

I have the following measure that calculates % change 

 

% Vic Change =
VAR _Num =

CALCULATE (
IF (ISBLANK(DISTINCTCOUNT('Table'[ID])), 0, (DISTINCTCOUNT('Table'[ID]))),
FILTER(ALL('Date'[FY]),
'Date'[FY] = MAX('Date'[FY])))
VAR _Den =
CALCULATE (
IF (ISBLANK(DISTINCTCOUNT('Table'[ID])), 0, (DISTINCTCOUNT('Table'[ID]))),
FILTER(ALL('Date'[FY]),
'Date'[FY] = MAX('Date'[FY])-1))
 
VAR _PercentChange = IFERROR((_Num-_Den)/_Den ,0)
RETURN
_PercentChange

It works perfectly 99% of the time, however if the previous year that is being compared to (defined in variable "_Den") has a value of 0, then no matter what the current year is (variable "_Num"), the % change shows a value 0f 0%. For example, the following should say an increase of 200%, not 0%:

LloydThomas_0-1647440985248.png

 


As mentioned works fine other than this, and even works fine for if both values are 0, as expected 0% change is shown:

LloydThomas_1-1647440985249.png

 

 

It also works fine if the current year value is 0 and previous year is greater than 0.
Any help appreciated.

2 REPLIES 2
VIJAYKUMART
Resolver I
Resolver I

replace the VAR _PercentChange  with the below formula 
VAR _PercentChange   = DIVIDE((_Num-_Den),_Den)
hope this helps
Anonymous
Not applicable

Hi @VIJAYKUMART Thanks for the reply. This doesn't seem to work, it brings back a (blank) value instead. 

LloydThomas_0-1647532590618.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors